MS Loyalty API
Bienvenido al API del MS de Lealtad, aquí encontrarás toda la información relacionada a los endpoints disponibles.
Autenticación
El API usa oAuth2 para la autenticación. Ciertas llamadas al API deben contener una autorización como se detalla abajo.
Authorization: Bearer API_KEY
Para obtener credenciales de acceso de tipo cliente (Grant cliente es adecuada para la autenticación de máquina a máquina.), y asi obtener el token correspondiente, usted puede ponerse en contacto con el equipo de desarrollo
Otra forma de autenticarse con el API es utilizar el token obtenido del Firebase Auth del MS de usuarios al momento de iniciar sesión.
Headers
Asegúrese de tener los siguientes encabezados de content type en cada solicitud:
Content-Type: application/json
Si está consumiendo el API desde un cliente frontend es necesario enviar el encabezado Platform con estos posibles valores: web, mobile, ios, android
Platform: web|mobile|ios|android
Errors
The API uses conventional HTTP response codes to indicate the success or failure of an API request. The table below contains a summary of the typical response codes:
| Code | Description |
|---|---|
| 200 | Everything is ok. |
| 400 | Valid data was given but the request has failed. |
| 401 | No valid API Key was given. |
| 404 | The request resource could not be found. |
| 405 | The method is not implemented |
| 422 | The payload has missing required parameters or invalid data was given. |
| 429 | Too many attempts. |
| 500 | Request failed due to an internal error. |
| 503 | API is offline for maintenance. |
OAuth2 Token ¶
Obtener token de acceso ¶
Obtener token de accesoPOST/oauth/token
Este endpoint permite obtener el token de acceso para clientes OAuth2
Example URI
Headers
Content-Type: application/jsonBody
{
"grant_type": "client_credentials",
"client_id": 1,
"client_secret": "ghVW0PVbKRRBCo8uRt..."
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"grant_type": {
"type": "string"
},
"client_id": {
"type": "number"
},
"client_secret": {
"type": "string"
}
},
"required": [
"grant_type",
"client_id",
"client_secret"
]
}200Headers
Content-Type: application/jsonBody
{
"token_type": "Bearer",
"expires_in": 31536000,
"access_token": "yJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij..."
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"token_type": {
"type": "string"
},
"expires_in": {
"type": "number"
},
"access_token": {
"type": "string"
}
},
"required": [
"token_type",
"expires_in",
"access_token"
]
}API de Reportes ¶
Reportes ¶
Reporte de puntos por tiendaGET/api/report/dailySummary/stores?startDate={startDate}&endDate={endDate}
Este endpoint permite obtener un reporte de puntos organizado por tienda y fecha.
Example URI
- startDate
string(required) Example: '201807-01’ (string, required)
- endDate
string(required) Example: '201807-30’ (string, required)
Headers
Content-Type: application/json
Authorization: Bearer API_KEY200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "Proceso exitoso",
"data": [
{
"date": "2018-07-12",
"week": 27,
"store": "EL RECREO",
"preregisteredPos": 0,
"subscribedAfterPos": 0,
"registeredApp": 0,
"registeredWeb": 0,
"referrals": 0,
"pointEarnedOrders": 0,
"pointEarnedCoupons": 15950,
"pointEarnedBalance": 0,
"pointRedeemed": 0,
"pointExpired": 0,
"pointReversedCoupon": 0,
"pointReversedOrder": 0
},
{
"date": "2018-07-12",
"week": 27,
"store": "EL RECREO",
"preregisteredPos": 0,
"subscribedAfterPos": 0,
"registeredApp": 0,
"registeredWeb": 0,
"referrals": 0,
"pointEarnedOrders": 0,
"pointEarnedCoupons": 15950,
"pointEarnedBalance": 0,
"pointRedeemed": 0,
"pointExpired": 0,
"pointReversedCoupon": 0,
"pointReversedOrder": 0
},
{
"date": "2018-07-12",
"week": 27,
"store": "EL RECREO",
"preregisteredPos": 0,
"subscribedAfterPos": 0,
"registeredApp": 0,
"registeredWeb": 0,
"referrals": 0,
"pointEarnedOrders": 0,
"pointEarnedCoupons": 15950,
"pointEarnedBalance": 0,
"pointRedeemed": 0,
"pointExpired": 0,
"pointReversedCoupon": 0,
"pointReversedOrder": 0
},
{
"date": "2018-07-12",
"week": 27,
"store": "EL RECREO",
"preregisteredPos": 0,
"subscribedAfterPos": 0,
"registeredApp": 0,
"registeredWeb": 0,
"referrals": 0,
"pointEarnedOrders": 0,
"pointEarnedCoupons": 15950,
"pointEarnedBalance": 0,
"pointRedeemed": 0,
"pointExpired": 0,
"pointReversedCoupon": 0,
"pointReversedOrder": 0
}
],
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "array"
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Reporte de puntos por productosGET/api/report/dailySummary/products?startDate={startDate}&endDate={endDate}
Este endpoint permite obtener un reporte de puntos por productos organizado por tienda y fecha.
Example URI
- startDate
string(required) Example: '201807-01’ (string, required)
- endDate
string(required) Example: '201807-30’ (string, required)
Headers
Content-Type: application/json
Authorization: Bearer API_KEY200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "Proceso exitoso",
"data": [
{
"date": "2018-07-20",
"week": 28,
"store": "PLATAFORMA GUBERNAMENTAL",
"codProduct": "3109",
"numOrders": 20,
"numProducts": 20,
"pointRedeemed": 82,
"pointEarnedOrders": 82,
"pointEarnedCoupons": 0,
"pointEarnedBalance": 0,
"numRedeemed": 20
},
{
"date": "2018-07-20",
"week": 28,
"store": "PLATAFORMA GUBERNAMENTAL",
"codProduct": "3109",
"numOrders": 20,
"numProducts": 20,
"pointRedeemed": 82,
"pointEarnedOrders": 82,
"pointEarnedCoupons": 0,
"pointEarnedBalance": 0,
"numRedeemed": 20
},
{
"date": "2018-07-20",
"week": 28,
"store": "PLATAFORMA GUBERNAMENTAL",
"codProduct": "3109",
"numOrders": 20,
"numProducts": 20,
"pointRedeemed": 82,
"pointEarnedOrders": 82,
"pointEarnedCoupons": 0,
"pointEarnedBalance": 0,
"numRedeemed": 20
},
{
"date": "2018-07-20",
"week": 28,
"store": "PLATAFORMA GUBERNAMENTAL",
"codProduct": "3109",
"numOrders": 20,
"numProducts": 20,
"pointRedeemed": 82,
"pointEarnedOrders": 82,
"pointEarnedCoupons": 0,
"pointEarnedBalance": 0,
"numRedeemed": 20
}
],
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "array"
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}API de Transacciones ¶
Transacciones ¶
Crear transacciónPOST/api/transaction
Este endpoint permite almacenar una transacción.
Example URI
Headers
Content-Type: application/json
Authorization: Bearer API_KEYBody
{
"type": "POINTS COUPON",
"code": "Bienvenido",
"externalId": "123",
"expirationDate": "2018-06-03",
"title": "Titulo",
"description": "Beneficio de puntos por Bienvenida",
"total": 100,
"customer": {
"externalId": "0100037894",
"name": "Santiago",
"data": {
"vendorId": "1",
"businessOwner": "2",
"giftCardAmount": "4",
"giftCardType": "MONETARY"
}
},
"store": {
"externalId": "1200037894",
"name": "Centro"
},
"checkbookId": "12240",
"transferTransactionId": "5446"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"code": {
"type": "string"
},
"externalId": {
"type": "string"
},
"expirationDate": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"total": {
"type": "number"
},
"customer": {
"type": "object",
"properties": {
"externalId": {
"type": "string"
},
"name": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"vendorId": {
"type": "string"
},
"businessOwner": {
"type": "string"
},
"giftCardAmount": {
"type": "string"
},
"giftCardType": {
"type": "string"
}
},
"required": [
"vendorId",
"businessOwner",
"giftCardAmount",
"giftCardType"
]
}
},
"required": [
"externalId",
"name",
"data"
]
},
"store": {
"type": "object",
"properties": {
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"checkbookId": {
"type": "string"
},
"transferTransactionId": {
"type": "string"
}
},
"required": [
"type",
"description",
"total",
"customer"
]
}200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": {
"id": "7860",
"title": "Cupón",
"description": "Beneficio de puntos por Bienvenida",
"code": "Bienvenido",
"external_entity_id": "Bienvenido",
"type": "CREDIT",
"total": "100",
"created_at": "2018-08-03 12:44:56",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
},
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"code": {
"type": "string"
},
"external_entity_id": {
"type": "string"
},
"type": {
"type": "string"
},
"total": {
"type": "string"
},
"created_at": {
"type": "string"
},
"unit": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"sign": {
"type": "string"
}
}
},
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"externalId": {
"type": "string"
},
"name": {
"type": "string"
},
"totals": {
"type": "array"
}
}
},
"store": {
"type": "string"
}
}
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Crear checkBookPOST/api/transaction/checkbook
Este endpoint permite almacenar un checkbook.
Example URI
Headers
Content-Type: application/json
Authorization: Bearer API_KEYBody
{
"type": "POINTS ORDER",
"customer": {
"externalId": "0100037894",
"name": "Santiago"
},
"code": "Bienvenido",
"externalId": "123",
"total": 100,
"earnedRedeemed": 20,
"store": {
"externalId": "1200037894",
"name": "Centro"
},
"title": "Titulo",
"detail": {
"name": "Twister",
"externalId": "39535",
"total": 10,
"earnedRedeemed": 20
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"customer": {
"type": "object",
"properties": {
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"externalId",
"name"
]
},
"code": {
"type": "string"
},
"externalId": {
"type": "string"
},
"total": {
"type": "number"
},
"earnedRedeemed": {
"type": "number"
},
"store": {
"type": "object",
"properties": {
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"externalId",
"name"
]
},
"title": {
"type": "string"
},
"detail": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"externalId": {
"type": "string"
},
"total": {
"type": "number"
},
"earnedRedeemed": {
"type": "number"
}
},
"required": [
"name",
"externalId",
"total"
]
}
},
"required": [
"type",
"customer",
"code",
"externalId",
"total",
"store"
]
}200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": {
"id": "7860",
"title": "Cupón",
"description": "Beneficio de puntos por Bienvenida",
"code": "Bienvenido",
"external_entity_id": "Bienvenido",
"type": "CREDIT",
"total": "100",
"created_at": "2018-08-03 12:44:56",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": {
"id": "7",
"externalId": "1200037894",
"name": "La Carolina"
}
},
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"code": {
"type": "string"
},
"external_entity_id": {
"type": "string"
},
"type": {
"type": "string"
},
"total": {
"type": "string"
},
"created_at": {
"type": "string"
},
"unit": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"sign": {
"type": "string"
}
}
},
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"externalId": {
"type": "string"
},
"name": {
"type": "string"
},
"totals": {
"type": "array"
}
}
},
"store": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Revertir TransacciónPOST/api/transaction/reverse
Este endpoint permite revertir una transacción.
Example URI
Headers
Content-Type: application/json
Authorization: Bearer API_KEYBody
{
"type": "POINTS ORDER",
"code": "Bienvenido"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"type",
"code"
]
}200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": {
"id": "7866",
"title": "Reverso de orden",
"description": "La Carolina",
"code": "BienvenidoDavid",
"external_entity_id": "BienvenidoDavid",
"type": "DEBIT",
"total": "20.00",
"created_at": "2018-08-06 12:18:15",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": {
"id": "7",
"externalId": "1200037894",
"name": "La Carolina"
}
},
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"code": {
"type": "string"
},
"external_entity_id": {
"type": "string"
},
"type": {
"type": "string"
},
"total": {
"type": "string"
},
"created_at": {
"type": "string"
},
"unit": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"sign": {
"type": "string"
}
}
},
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"externalId": {
"type": "string"
},
"name": {
"type": "string"
},
"totals": {
"type": "array"
}
}
},
"store": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
}
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Revertir TransaccionesPOST/api/transaction/reverseMany
Este endpoint permite revertir varias transacciones.
Example URI
Headers
Content-Type: application/json
Authorization: Bearer API_KEYBody
{
"type": "POINTS ORDER",
"codes": [
"Bienvenido3",
"Bienvenido4"
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"codes": {
"type": "array"
}
},
"required": [
"type",
"codes"
]
}200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": [
{
"id": "7867",
"title": "Reverso de orden",
"description": "La Carolina",
"code": "Bienvenido3",
"external_entity_id": "Bienvenido3",
"type": "DEBIT",
"total": "20.00",
"created_at": "2018-08-06 12:18:15",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": {
"id": "7",
"externalId": "1200037894",
"name": "La Carolina"
}
},
{
"id": "7868",
"title": "Reverso de orden",
"description": "La Carolina",
"code": "Bienvenido4",
"external_entity_id": "Bienvenido4",
"type": "DEBIT",
"total": "20.00",
"created_at": "2018-08-06 12:18:20",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": {
"id": "7",
"externalId": "1200037894",
"name": "La Carolina"
}
}
],
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "array"
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Transferir puntosPOST/api/transaction/transfer
Este endpoint permite transferir puntos de una cuenta a otra.
Example URI
Headers
Content-Type: application/json
Authorization: Bearer API_KEYBody
{
"type": "BALANCE TRANSFER DEBIT",
"total": 1,
"title": "Transferencia",
"customerFrom": {
"externalId": "1716583941",
"name": "David"
},
"customerTo": {
"externalId": "1716583941001",
"name": "Santiago"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"total": {
"type": "number"
},
"title": {
"type": "string"
},
"customerFrom": {
"type": "object",
"properties": {
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"externalId",
"name"
]
},
"customerTo": {
"type": "object",
"properties": {
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"externalId",
"name"
]
}
},
"required": [
"type",
"total",
"customerFrom",
"customerTo"
]
}200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": {
"from": {
"id": "7873",
"title": "Transferencia",
"description": "Santiago",
"code": "null",
"external_entity_id": "null",
"type": "DEBIT",
"total": "1.00",
"created_at": "2018-08-06 12:18:20",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
},
"to": {
"id": "7874",
"title": "Transferencia",
"description": "David",
"code": "null",
"external_entity_id": "null",
"type": "DEBIT",
"total": "1.00",
"created_at": "2018-08-06 12:18:20",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
}
},
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"from": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"code": {
"type": "string"
},
"external_entity_id": {
"type": "string"
},
"type": {
"type": "string"
},
"total": {
"type": "string"
},
"created_at": {
"type": "string"
},
"unit": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"sign": {
"type": "string"
}
}
},
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"externalId": {
"type": "string"
},
"name": {
"type": "string"
},
"totals": {
"type": "array"
}
}
},
"store": {
"type": "string"
}
}
},
"to": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"code": {
"type": "string"
},
"external_entity_id": {
"type": "string"
},
"type": {
"type": "string"
},
"total": {
"type": "string"
},
"created_at": {
"type": "string"
},
"unit": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"sign": {
"type": "string"
}
}
},
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"externalId": {
"type": "string"
},
"name": {
"type": "string"
},
"totals": {
"type": "array"
}
}
},
"store": {
"type": "string"
}
}
}
}
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Redimir voucherPOST/api/transaction/redeemFullBalance
Este endpoint permite redimir un voucher y almacenar un checkbook.
Example URI
Headers
Content-Type: application/json
Authorization: Bearer API_KEYBody
{
"type": "POINTS ORDER",
"customer": {
"externalId": "0100037894",
"name": "0100037894"
},
"code": "Bienvenido",
"externalId": "123",
"total": 100,
"earnedRedeemed": 20,
"store": {
"externalId": "1200037894",
"name": "Centro"
},
"title": "Titulo",
"detail": {
"name": "Twister",
"externalId": "39535",
"total": 10,
"earnedRedeemed": 20
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"type": {
"type": "string"
},
"customer": {
"type": "object",
"properties": {
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"externalId",
"name"
]
},
"code": {
"type": "string"
},
"externalId": {
"type": "string"
},
"total": {
"type": "number"
},
"earnedRedeemed": {
"type": "number"
},
"store": {
"type": "object",
"properties": {
"externalId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"externalId",
"name"
]
},
"title": {
"type": "string"
},
"detail": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"externalId": {
"type": "string"
},
"total": {
"type": "number"
},
"earnedRedeemed": {
"type": "number"
}
},
"required": [
"name",
"externalId",
"total"
]
}
},
"required": [
"type",
"customer",
"code",
"externalId",
"total",
"store"
]
}200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": {
"id": "209",
"externalId": "0100037894",
"name": "0100037894",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"batch": "null",
"set_name": "null"
}
]
},
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"externalId": {
"type": "string"
},
"name": {
"type": "string"
},
"totals": {
"type": "array"
}
}
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Obtener TransaccionesGET/api/transaction/history?customerId={customerId}&page={page}
Este endpoint devuelve las transacciones del cliente .
Example URI
- customerId
number(required) Example: '1716583941'- page
number(required) Example: '2'
Headers
Content-Type: application/json
Authorization: Bearer API_KEY200Headers
Content-Type: application/jsonBody
{
"data": [
{
"id": "7874",
"title": "Transferencia",
"description": "David",
"code": "null",
"external_entity_id": "null",
"type": "DEBIT",
"total": "1.00",
"created_at": "2018-08-06 12:18:20",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
},
{
"id": "7874",
"title": "Transferencia",
"description": "David",
"code": "null",
"external_entity_id": "null",
"type": "DEBIT",
"total": "1.00",
"created_at": "2018-08-06 12:18:20",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
},
{
"id": "7874",
"title": "Transferencia",
"description": "David",
"code": "null",
"external_entity_id": "null",
"type": "DEBIT",
"total": "1.00",
"created_at": "2018-08-06 12:18:20",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
},
{
"id": "7874",
"title": "Transferencia",
"description": "David",
"code": "null",
"external_entity_id": "null",
"type": "DEBIT",
"total": "1.00",
"created_at": "2018-08-06 12:18:20",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "COINS",
"sign": "$"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "array"
}
}
}Obtener transacción por códigoGET/api/transaction/transactionByCode?code={code}&type={type}
Este endpoint permite obtener una tranbsacción por el código.
Example URI
- code
string(required) Example: 'Bienvenido732'- type
string(required) Example: 'POINTS COUPON'
Headers
Content-Type: application/json
Authorization: Bearer API_KEY200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": [
{
"id": "7860",
"title": "Cupón",
"description": "Beneficio de puntos por Bienvenida",
"code": "Bienvenido",
"external_entity_id": "Bienvenido",
"type": "CREDIT",
"total": "100",
"created_at": "2018-08-03 12:44:56",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
}
],
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "array"
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Obtener transacción de recargas por clienteGET/api/transaction/reloadsByCustomer?document={document}&from={from}&to={to}
Este endpoint permite obtener una tranbsacción por el documento del cliente y un rango de fechas .
Example URI
- document
string(required) Example: '0401591714'- from
string(required) Example: '201809-03’ (string, required)
- to
string(required) Example: '201809-30’ (string, required)
Headers
Content-Type: application/json
Authorization: Bearer API_KEY200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": [
{
"id": "7860",
"title": "Cupón",
"description": "Beneficio de puntos por Bienvenida",
"code": "Bienvenido",
"external_entity_id": "Bienvenido",
"type": "CREDIT",
"total": "100",
"created_at": "2018-08-03 12:44:56",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
}
],
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "array"
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}Obtener transacción de puntos por clienteGET/api/transaction/pointsByCustomer?document={document}&from={from}&to={to}
Este endpoint permite obtener una tranbsacción por el documento del cliente y un rango de fechas .
Example URI
- document
string(required) Example: '0401591714'- from
string(required) Example: '201809-03’ (string, required)
- to
string(required) Example: '201809-30’ (string, required)
Headers
Content-Type: application/json
Authorization: Bearer API_KEY200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "OK",
"data": [
{
"id": "7860",
"title": "Cupón",
"description": "Beneficio de puntos por Bienvenida",
"code": "Bienvenido",
"external_entity_id": "Bienvenido",
"type": "CREDIT",
"total": "100",
"created_at": "2018-08-03 12:44:56",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"customer": {
"id": "209",
"externalId": "0100037894",
"name": "Santiago",
"totals": [
{
"id": "829",
"total_amount": "250.00",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"batch": "null",
"set_name": "null"
}
]
},
"store": "null"
}
],
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "array"
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}API de Lotes ¶
Lotes ¶
Obtener Lotes ActivosGET/api/batch/expiration?customerId={customerId}
Este endpoint devuelve lotes activos del cliente .
Example URI
- customerId
number(required) Example: '1716583941'
Headers
Content-Type: application/json
Authorization: Bearer API_KEY200Headers
Content-Type: application/jsonBody
{
"data": [
{
"id": "3985",
"total_amount": "460.00",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"batch object": {
"id": "143",
"start_date": "null",
"end_date": "null",
"expiration_date": "2019-01-15 17:48:12"
},
"set_name": "PROMOCIONAL"
},
{
"id": "3916",
"total_amount": "00.00",
"unit": {
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
"batch object": {
"id": "3916",
"start_date": "null",
"end_date": "null",
"expiration_date": "2019-01-15 17:48:12"
},
"set_name": "PROMOCIONAL"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "array"
}
}
}API de Grupos ¶
Grupos ¶
Api de gruposGET/api/group/default
Endpoint que retorna grupos
Example URI
Headers
Content-Type: application/json
Authorization: Bearer API_KEY200Headers
Content-Type: application/jsonBody
{
"code": "200",
"status": "success",
"message": "Proceso exitoso",
"data": {
"id": "1",
"name": "AMIGO",
"description": "AMIGO",
"group_rules": [
{
"id": "1",
"name": "POINTS",
"sign": "PTS"
},
{
"id": "1",
"name": "POINTS",
"sign": "PTS"
}
],
"next_group": {
"id": "2",
"name": "BUEN AMIGO",
"description": "BUEN AMIGO"
}
},
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"group_rules": {
"type": "array"
},
"next_group": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
}
},
"warning": {},
"error": {}
}
}422Headers
Content-Type: application/jsonBody
{
"code": 422,
"status": "error",
"message": "Error de Validacion",
"warning": {
"code": "null",
"field": "field_name",
"value": "Error Description"
},
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
]
},
"field": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"error": {}
}
}401Headers
Content-Type: application/jsonBody
{
"code": 401,
"status": "error",
"message": "Unauthenticated",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}403Headers
Content-Type: application/jsonBody
{
"code": 403,
"status": "error",
"message": "Forbidden",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}404Headers
Content-Type: application/jsonBody
{
"code": 404,
"status": "error",
"message": "404 Not Found",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}500Headers
Content-Type: application/jsonBody
{
"code": 500,
"status": "error",
"message": "Internal Server Error",
"warning": [],
"error": []
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"code": {
"type": "number"
},
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"warning": {},
"error": {}
}
}