1.0.0
OAS 3.0.0

Perú Legacy API

Introduction

This documentation is only valid for Peru. In order to place orders for Chazki services, endpoints were set up to record delivery and check the status of orders.

These services are registered in the domain owned by chazki and are detailed in the section below.

Find more about Chazki here. See also our Terms and Conditions.

ANEXO

States of Orders

Estado Descripción
NEW The order is just entered into the system
PRE_OFFERED Status prior to the order being sent to planning and offered
OFFERED The request is offered for a Chazki to accept
WAITING The Chazki is on his way to pick up the order
ARRIVED The Chazki arrives at the order pick-up point
FAILED_PICK Error during order pick up
IN_PROGRESS The Chazki is on his way to deliver the order
FAILED Failure occurred during the delivery of the order
COMPLETED The order is delivered successfully
REPROGRAMMED The order is rescheduled

Order Types

Estado Descripción
REGULAR Order that can be delivered the next day after being requested
EXPRESS Order that is delivered in a maximum of 3 hours the same day it is made
PROGRAMADO Order delivered according to three schedules: 9-13, 13-17, 17-21
FOOD Food order scheduled to be delivered within one hour
FOOD_PROGRAMADO Food order scheduled to be delivered at a specific time

Timezone

Ciudad UTC UTC DST (Verano) Timezone
Lima UTC -5 UTC -5 America/Lima
Ciudad de Mexico UTC -6 UTC -5 America/Mexico_City
Guadalajara UTC -6 UTC -5 America/Mexico_City
Monterrey UTC -6 UTC -5 America/Monterrey
Buenos Aires UTC -3 UTC -3 America/Argentina/Buenos_Aires

List of all recorded timezones

wiki: Lista de todos los timezones

URL Encode

To send the timezone as a query param, it is necessary to encode the timezone.

Timezone Encode
America/Lima America%2fLima
America/Mexico_City America%2fMexico_City
America/Mexico_City America%2fMexico_City
America/Monterrey America%2fMonterrey
America/Argentina/Buenos_Aires America%2fArgentina%2fBuenos_Aires
API Key (enterprise-key)
Client Libraries
Shell
Ruby
Node.js
PHP
Python
More

OrdersService

List of endpoints for register orders.

/create/delivery-service

This endpoint allows you to register a delivery or route. Since the shipment is an arrangement, several points can be registered where you want the Chazki to arrive, therefore, a route is formed; otherwise, only one arrival point can be registered.

Body
application/json
array
Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

POST/create/delivery-service
Shell cURL
curl --request POST \
  --url https://us-central1-chazki-link-beta.cloudfunctions.net/cf-custom-integrations-beta/api/legacy/peru/create/delivery-service \
  --header 'Content-Type: application/json' \
  --header 'Enterprise-Key: YOUR_TOKEN' \
  --data '[]'
{
  "response": 1,
  "descriptionResponse": "Order created succesfully",
  "codeDelivery": [
    "TP22932"
  ],
  "relatedTrackCode": [
    "TP22932"
  ]
}

/cancel/order

This API allows us to cancel an order before it is OFFERED.

Query Parameters
  • trackCode
    required
    string

    Delivery track code.

  • language
    string

    Language for message response.

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

PUT/cancel/order
Shell cURL
curl --request PUT \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/cf-custom-integrations-beta/api/legacy/peru/cancel/order?trackCode=' \
  --header 'Enterprise-Key: YOUR_TOKEN'
{
  "response": 1,
  "deliveryResponse": "Se canceló correctamente la orden"
}

/status/record

This API allows us to see the states through which the delivery passed grouped by services. The grouping of services refers to the attempts that were made to deliver the delivery.

Query Parameters
  • code
    required
    string

    Delivery track code.

  • timezone
    string

    Timezone of city. Anexo Timezone

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

GET/status/record
Shell cURL
curl --request GET \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/cf-custom-integrations-beta/api/legacy/peru/status/record?code=' \
  --header 'Enterprise-Key: YOUR_TOKEN'
{
  "response": 1,
  "descriptionResponse": "SUCCESS",
  "message": "",
  "service_1": [
    {
      "status": "Nuevo",
      "date": "2020-04-30T00:00:00.000Z",
      "reason": "",
      "reasonCode": ""
    }
  ],
  "service_2": [
    {
      "status": "Nuevo",
      "date": "2020-04-30T00:00:00.000Z",
      "reason": "",
      "reasonCode": ""
    }
  ]
}

/status/record/all

This API allows us to see the states through which the delivery passed grouped by services. The grouping of services refers to the attempts that were made to deliver the delivery.

Query Parameters
  • code
    required
    string

    Delivery track code.

  • timezone
    string

    Timezone of city. Anexo Timezone

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

GET/status/record/all
Shell cURL
curl --request GET \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/cf-custom-integrations-beta/api/legacy/peru/status/record/all?code=' \
  --header 'Enterprise-Key: YOUR_TOKEN'
{
  "response": 1,
  "descriptionResponse": "SUCCESS",
  "timezone": "UTC",
  "statusList": [
    {
      "status": "NEW",
      "date": "2020-04-30T00:00:00.000Z",
      "attemptNumber": 1,
      "reason": "",
      "reasonCode": ""
    }
  ]
}

AffiliatedService

List of endpoints for status and position

/tracking/select/delivery-code

This API allows us to see the movement of the Chazki and the status of the delivery.

Query Parameters
  • code
    required
    string

    Delivery track code.

  • timezone
    string

    Timezone of city. Anexo Timezone

  • language
    string

    Language for message response.

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

GET/tracking/select/delivery-code
Shell cURL
curl --request GET \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/cf-custom-integrations-beta/api/legacy/peru/tracking/select/delivery-code?code=' \
  --header 'Enterprise-Key: YOUR_TOKEN'
{
  "position": {
    "latitude": 0,
    "longitude": 0
  },
  "status": "ASSIGNED",
  "timestamp": "2020-04-30T00:00:00.000Z",
  "rd": "Drive name",
  "cel": "Number Phone",
  "motivo": "Client not available"
}

ImagesService

List of endpoints for images order.

/tracking/images

This API allows us to see the photos taken by the chazki at the time of delivery.

Query Parameters
  • code
    required
    string

    Delivery track code.

  • language
    string

    Language for message response.

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

GET/tracking/images
Shell cURL
curl --request GET \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/cf-custom-integrations-beta/api/legacy/peru/tracking/images?code=' \
  --header 'Enterprise-Key: YOUR_TOKEN'
{
  "response": 1,
  "deliveryResponse": "SUCCESS",
  "status": "UTC",
  "orderAssociated": "iVBORw0KGgoAAAANSUhEUgAAAl8AAAQ4CAIAAAC4",
  "orderImages": [
    "iVBORw0KGgoAAAANSUhEUgAAAl8AAAQ4CAIAAAC4"
  ]
}

CoverageService

List of endpoints for coverage

LabelServices

List of endpoints for label

FailFnResponse

{} FailFnResponse
response
number

Code response (0: Error, 1: Ok).

descriptionResponse
string

Bug Description.

ExampleEl trackcode no existe o el enterpriseKey no es correcto

FailCvResponse

{} FailCvResponse
response
number

Code response (99: Error query: Error, 1: Ok).

Example99
descriptionResponse
string

Bug Description.

ExampleNo se han encontrado coordenadas

labelsOrders

{} labelsOrders
trackCodes
required
array string[]

List of registered trackCodes.

ExampleNroOrden1
  • Global Environment
    { "exampleKey": "exampleValue" }
  • Global Environment
    { "exampleKey": "exampleValue" }
[]
Response
.,,uod8B8bou,,. ..,uod8BBBBBBBBBBBBBBBBRPFT?l!i:. ||||||||||||||!?TFPRBBBBBBBBBBBBBBB8m=, |||| '""^^!!||||||||||TFPRBBBVT!:...! |||| '""^^!!|||||?!:.......! |||| ||||.........! |||| ||||.........! |||| ||||.........! |||| ||||.........! |||| ||||.........! |||| ||||.........! ||||, ||||.........` |||||!!-._ ||||.......;. ':!|||||||||!!-._ ||||.....bBBBBWdou,. bBBBBB86foi!|||||||!!-..:|||!..bBBBBBBBBBBBBBBY! ::!?TFPRBBBBBB86foi!||||||||!!bBBBBBBBBBBBBBBY..! :::::::::!?TFPRBBBBBB86ftiaabBBBBBBBBBBBBBBY....! :::;`"^!:;::::::!?TFPRBBBBBBBBBBBBBBBBBBBY......! ;::::::...''^::::::::::!?TFPRBBBBBBBBBBY........! .ob86foi;::::::::::::::::::::::::!?TFPRBY..........` .b888888888886foi;:::::::::::::::::::::::..........` .b888888888888888888886foi;::::::::::::::::...........b888888888888888888888888888886foi;:::::::::......`!Tf998888888888888888888888888888888886foi;:::....` '"^!|Tf9988888888888888888888888888888888!::..` '"^!|Tf998888888888888888888888889!! '` '"^!|Tf9988888888888888888!!` iBBbo. '"^!|Tf998888888889!` WBBBBbo. '"^!|Tf9989!` YBBBP^' '"^!` `
    Go Home