Back to top

Coupons API

Bienvenido al API de ECOMMERCE COUPONS para el FRONTEND, aquí encontrarás toda la información relacionada a los endpoints disponibles.

Autenticación

Las apps web o móvil deben autenticar los usuarios utilizando gate.io, ya que en autenticación con la API se utiliza los Tokens ID de Firebase, tokens JWT firmados que identifican de manera segura a un usuario.

El token complementariamente permite obtener el identificador del usuario UID de forma implícita, por ende no es necesario enviar el UID como parámetro o en el cuerpo de endpoints que requieran dicho identificador.Las apps web o móvil deben autenticar los usuarios utilizando Firebase Authentication, ya que en autenticación con la API se utiliza los Tokens ID de Firebase, tokens JWT firmados que identifican de manera segura a un usuario.

Headers

Asegúrese de tener los siguientes encabezados en cada solicitud:

Authorization: Bearer API_KEY
Content-Type: application/json
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.

API de Tokens de Máquina a Máquina

Cupones

OBTENER TOKEN DE ACCESSO
POST/oauth/token

Este endpoint permite obtener el token de acceso para clientes OAuth2

Example URI

POST https://coupons.v2.desarrollo-redbrand.com/oauth/token
Request
HideShow
Headers
Content-Type: application/json
Platform: web
Body
{
  "grant_type": "client-credentials",
  "client_id": 1,
  "client_secret": "3cVq0NFUPiK7gE79n8Q3t0uekfm81dfRinffURqO"
}
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"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "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": "string"
    },
    "access_token": {
      "type": "string"
    }
  }
}

Api de Billetera de Beneficios

Billetera de Beneficios

Aplicar cupón a billetara de beneficios
POST/api/walletProfit/apply

Este endpoint permitirá asignar un cupón a un usuario. Si el endpoint lleva el parámetro shoppingCartId se asignará al carrito de compras con ese id

Example URI

POST https://coupons.v2.desarrollo-redbrand.com/api/walletProfit/apply
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer PassportTokenId
Platform: web|mobile|ios|android
Body
{
  "code": "XS03PYW67",
  "user": {
    "name": "Wilmer",
    "lastname": "Zambrano",
    "document": "1234567890",
    "email": "w.zg@trade.ec"
  },
  "shoppingCartId": "2"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "user": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "lastname": {
          "type": "string"
        },
        "document": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "lastname",
        "document",
        "email"
      ]
    },
    "shoppingCartId": {
      "type": "string",
      "description": "Este parárametro debe ser usado cunado está un carrito de compras activo"
    }
  },
  "required": [
    "code",
    "user"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 200,
  "status": "``",
  "message": "OK. Cupón añadido con éxito!",
  "data": [
    {
      "id": 3,
      "name": "Tiene 3 envios gratis",
      "text": "El costo de envio será cero ser solo pagas el valor de tus compras",
      "used": 0,
      "code": "IU34BWBI65",
      "expirationDate": "2018-06-29 00:00:00",
      "createdDate": "2018-05-22",
      "startDate": "2018-05-22",
      "endDate": "2018-07-22",
      "combined": "YES",
      "successMessage": "El beneficio fue aplicado satisfactoriamente",
      "type": "PRODUCT",
      "status": "ACTIVE",
      "instruction": "Instrucciones...",
      "discountPercentage": 12,
      "logicOperator": "ÀND",
      "limitAward": 1,
      "externalId": "jwi782nd8odwdh298",
      "limitBenefit": 1,
      "unit": {
        "id": 2,
        "name": "LIBRAS",
        "sign": "£"
      },
      "amount": 4,
      "termAndCondition": "Las condiciones de uso de este beneficio son...",
      "images": [
        {
          "type": "Imagen grande",
          "image_url": "http://domain.com/path/img.png",
          "image_file_name": "1314147372732"
        },
        {
          "type": "Imagen grande",
          "image_url": "http://domain.com/path/img.png",
          "image_file_name": "1314147372732"
        }
      ],
      "isValid": "false"
    },
    {
      "id": 3,
      "name": "Tiene 3 envios gratis",
      "text": "El costo de envio será cero ser solo pagas el valor de tus compras",
      "used": 0,
      "code": "IU34BWBI65",
      "expirationDate": "2018-06-29 00:00:00",
      "createdDate": "2018-05-22",
      "startDate": "2018-05-22",
      "endDate": "2018-07-22",
      "combined": "YES",
      "successMessage": "El beneficio fue aplicado satisfactoriamente",
      "type": "PRODUCT",
      "status": "ACTIVE",
      "instruction": "Instrucciones...",
      "discountPercentage": 12,
      "logicOperator": "ÀND",
      "limitAward": 1,
      "externalId": "jwi782nd8odwdh298",
      "limitBenefit": 1,
      "unit": {
        "id": 2,
        "name": "LIBRAS",
        "sign": "£"
      },
      "amount": 4,
      "termAndCondition": "Las condiciones de uso de este beneficio son...",
      "images": [
        {
          "type": "Imagen grande",
          "image_url": "http://domain.com/path/img.png",
          "image_file_name": "1314147372732"
        },
        {
          "type": "Imagen grande",
          "image_url": "http://domain.com/path/img.png",
          "image_file_name": "1314147372732"
        }
      ],
      "isValid": "false"
    }
  ],
  "total": 50,
  "perPage": 15,
  "currentPage": 1,
  "lastPage": 4,
  "nextPageUrl": "https://coupons.v2.desarrollo-redbrand.com/api/coupons?page=2",
  "prevPageUrl": "null",
  "warning": "null",
  "error": "null"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number"
    },
    "status": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "data": {
      "type": "array"
    },
    "total": {
      "type": "number"
    },
    "perPage": {
      "type": "number"
    },
    "currentPage": {
      "type": "number"
    },
    "lastPage": {
      "type": "number"
    },
    "nextPageUrl": {
      "type": "string"
    },
    "prevPageUrl": {
      "type": "string"
    },
    "warning": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}

Listar Beneficios de la Billetera de beneficios
GET/api/walletProfit?orderBy={orderBy}&sortBy={sortBy}&page={page}&size={size}&shoppingCartId={shoppingCartId}&status={status}

Este endpoint permite obtener los cupones del usuario, esta respuesta es paginada en orden ascendente. El parámetro sortBy unicamente podrá ser ASC o DESC, el parámetro orderBy será por fecha de creación creation_at o fecha de expiración expiration_date, el parámetro page define la página y el parámetro define el número de items por página. Si no envia parámetros ser&aacuten ordenados por fecha de creación y descendentemente con un límite de 15 items en la respuesta. El parámetro status devolverá todos sino es parte del request.

  • Estados de los premios: ACTIVE,INACTIVE,PENDING

Example URI

GET https://coupons.v2.desarrollo-redbrand.com/api/walletProfit?orderBy=expiration_date&sortBy=ASC&page=1&size=15&shoppingCartId=QmwnQeRLReLuQYm7f8tv&status=ACTIVE
URI Parameters
HideShow
shoppingCartId
string (optional) Example: QmwnQeRLReLuQYm7f8tv
sortBy
string (optional) Example: ASC
orderBy
string (optional) Example: expiration_date
page
number (optional) Example: 1
size
number (optional) Example: 15
status
string (optional) Example: ACTIVE
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer PassportToken
Platform: web|mobile|ios|android
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 200,
  "status": "``",
  "message": "OK",
  "data": [
    {
      "id": 3,
      "name": "Tiene 3 envios gratis",
      "text": "El costo de envio será cero ser solo pagas el valor de tus compras",
      "used": 0,
      "code": "IU34BWBI65",
      "expirationDate": "2018-06-29 00:00:00",
      "createdDate": "2018-05-22",
      "startDate": "2018-05-22",
      "endDate": "2018-07-22",
      "combined": "YES",
      "successMessage": "El beneficio fue aplicado satisfactoriamente",
      "type": "PRODUCT",
      "status": "ACTIVE",
      "instruction": "Instrucciones...",
      "discountPercentage": 12,
      "logicOperator": "ÀND",
      "limitAward": 1,
      "externalId": "jwi782nd8odwdh298",
      "limitBenefit": 1,
      "unit": {
        "id": 2,
        "name": "LIBRAS",
        "sign": "£"
      },
      "amount": 4,
      "termAndCondition": "Las condiciones de uso de este beneficio son...",
      "images": [
        {
          "type": "Imagen grande",
          "image_url": "http://domain.com/path/img.png",
          "image_file_name": "1314147372732"
        },
        {
          "type": "Imagen grande",
          "image_url": "http://domain.com/path/img.png",
          "image_file_name": "1314147372732"
        }
      ],
      "isValid": "false"
    },
    {
      "id": 3,
      "name": "Tiene 3 envios gratis",
      "text": "El costo de envio será cero ser solo pagas el valor de tus compras",
      "used": 0,
      "code": "IU34BWBI65",
      "expirationDate": "2018-06-29 00:00:00",
      "createdDate": "2018-05-22",
      "startDate": "2018-05-22",
      "endDate": "2018-07-22",
      "combined": "YES",
      "successMessage": "El beneficio fue aplicado satisfactoriamente",
      "type": "PRODUCT",
      "status": "ACTIVE",
      "instruction": "Instrucciones...",
      "discountPercentage": 12,
      "logicOperator": "ÀND",
      "limitAward": 1,
      "externalId": "jwi782nd8odwdh298",
      "limitBenefit": 1,
      "unit": {
        "id": 2,
        "name": "LIBRAS",
        "sign": "£"
      },
      "amount": 4,
      "termAndCondition": "Las condiciones de uso de este beneficio son...",
      "images": [
        {
          "type": "Imagen grande",
          "image_url": "http://domain.com/path/img.png",
          "image_file_name": "1314147372732"
        },
        {
          "type": "Imagen grande",
          "image_url": "http://domain.com/path/img.png",
          "image_file_name": "1314147372732"
        }
      ],
      "isValid": "false"
    }
  ],
  "total": 50,
  "perPage": 15,
  "currentPage": 1,
  "lastPage": 4,
  "nextPageUrl": "https://coupons.v2.desarrollo-redbrand.com/api/coupons?page=2",
  "prevPageUrl": "null",
  "warning": "null",
  "error": "null"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number"
    },
    "status": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "data": {
      "type": "array"
    },
    "total": {
      "type": "number"
    },
    "perPage": {
      "type": "number"
    },
    "currentPage": {
      "type": "number"
    },
    "lastPage": {
      "type": "number"
    },
    "nextPageUrl": {
      "type": "string"
    },
    "prevPageUrl": {
      "type": "string"
    },
    "warning": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}

Aplicar beneficio en carrito de compras
PUT/api/walletProfit/applyProfits

Este endpoint permitirá cambiar el estado de un beneficio/premio a pendiente y enviar el beneficio

Example URI

PUT https://coupons.v2.desarrollo-redbrand.com/api/walletProfit/applyProfits
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer PassportTokenId
Body
{
  "profitId": [
    171,
    196
  ],
  "shoppingCartId": "0T2iZfSFtKhAGlnLAtqX7Q2xIlQ2",
  "action": "COMMIT"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "profitId": {
      "type": "array"
    },
    "shoppingCartId": {
      "type": "string",
      "description": "Id del carrito de compras en el que se desea aplicar el beneficio"
    },
    "action": {
      "type": "string",
      "enum": [
        "COMMIT",
        "ROLLBACK"
      ]
    }
  },
  "required": [
    "profitId",
    "shoppingCartId",
    "action"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 200,
  "status": "success",
  "message": "Ok. Beneficio Válido",
  "data": [
    {
      "type": "PRODUCT",
      "award": {
        "product_id": 100
      }
    }
  ],
  "warning": "null",
  "error": "null"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number"
    },
    "status": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "data": {
      "type": "array"
    },
    "warning": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}

API de Invitados

Cupones

Listar Invitados
GET/api/invite

Example URI

GET https://coupons.v2.desarrollo-redbrand.com/api/invite
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKVUzI1NiIsImp0aS...(Token Firebase)
Platform: mobile
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 200,
  "status": "``",
  "message": "OK",
  "data": [
    {
      "id": 309,
      "extras": {
        "name": "Wilmer",
        "email": "wilmer.zambrano@trade.ec",
        "phone": "00968808831",
        "document": "1311444813",
        "lastname": "Zambrano",
        "birthdate": "1990-07-08",
        "documentType": "CI"
      },
      "status": "Pendiente"
    },
    {
      "id": 309,
      "extras": {
        "name": "Wilmer",
        "email": "wilmer.zambrano@trade.ec",
        "phone": "00968808831",
        "document": "1311444813",
        "lastname": "Zambrano",
        "birthdate": "1990-07-08",
        "documentType": "CI"
      },
      "status": "Pendiente"
    }
  ],
  "warning": "null",
  "error": "null"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number"
    },
    "status": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "data": {
      "type": "array"
    },
    "warning": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}

API de Parámetros

Parámetros

Listar Parámetros
GET/api/parameter

Este endpoint permite obtener los parámetros para la configuración de cupones

Example URI

GET https://coupons.v2.desarrollo-redbrand.com/api/parameter
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer PassportToken
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 200,
  "status": "success",
  "message": "OK. Parámetro actualizado satisfactoriamente",
  "data": [
    {
      "id": 1,
      "name": "stock_referred",
      "value": "5",
      "frontend": "NO",
      "externalService": "BENEFIT",
      "label": "Número de Código para Referidos"
    },
    {
      "id": 1,
      "name": "stock_referred",
      "value": "5",
      "frontend": "NO",
      "externalService": "BENEFIT",
      "label": "Número de Código para Referidos"
    }
  ],
  "warning": "null",
  "error": "null"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number"
    },
    "status": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "data": {
      "type": "array"
    },
    "warning": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}

Actualizar Parámetros
PUT/api/parameter

Este endpoint permite actualizar los parámetros

Example URI

PUT https://coupons.v2.desarrollo-redbrand.com/api/parameter
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer PassportToken
Body
{
  "name": "stock_referred",
  "value": "6"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "value": {
      "type": "string"
    }
  },
  "required": [
    "name",
    "value"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 200,
  "status": "``",
  "message": "OK",
  "data Parameters": "Hello, world!",
  "warning": "null",
  "error": "null"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number"
    },
    "status": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "data Parameters": {
      "type": "string"
    },
    "warning": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "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": {}
  }
}

Generated by aglio on 21 Aug 2018