1.0.0
OAS 3.0.0

API Chazki

In order to place orders for Chazki's services, endpoints were enabled to record the delivery and check the orders status. These services are registered in the domain owned by chazki and are detailed in the section below. Find out more about Chazki here. See also our

Order status

Status Description
NEW Shipment created but without any management.
PICKUP Shipping is located to assign a route to pick up.
GOTO_PICK On the way to be picked up (the delivery person is going to the pick-up point).
ARRIVED_PICK The driver (chazki) is located at the pick-up point/place.
PICKING The package was picked up.
FAILED_PICK Failed to pick up the package.
COLLECTED Package(s) collected, found in Chazki's possession.
GOTO_DELIVER On the way to be delivered (the delivery person is going to the destination of delivery).
ARRIVED_DELIVER The delivery person is at the place/point of delivery.
DELIVERED The shipment was completed.
FAILED_DROP Failed to deliver the package.
RETURNED Shipping management returned to the customer.
CANCELED Shipping cancelled.

Webhook

To access the notification mechanism via webhooks, you must tell us what will be the url to which the status change notifications of an order will be sent.

It is important that the hook URL must start with the protocol (https) and take into account Note that all pushes will be of type POST. All webhooks expect a response with code 200.

It is recommended that the response with code 200 be done asynchronously to avoid timeout errors.

STATE PUSH

This information will be sent each time the status of a shipment is updated and will be sent with the following body:

{
  "delivery_code": "4957783420",
  "delivery_status": "DELIVERED",
  "timestamp": "2022-02-04T22:44:30.652Z",
  "url_delivery_code": "https://nintendo.chazki.com/trackcodeTracking/4957783420"
}
API Key (enterprise-Key)
Client Libraries
Shell
Ruby
Node.js
PHP
Python
More

/uploadClientOrders

This endpoint allows to register a delivery. Since the data can be grouped into an array, multiple deliveries can be registered.Note: The objects structure in the 'orders' array is the same as the one provided in the schema for CSV loading. The following list of parameters may have more or fewer fields. In any case, use the fields from the CSV scheme.

Body
application/json
enterpriseKey
required
string

Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Example1fb07e7c-eca2-45c1-b743-16130ff3212e
orders
array object[]
Responses
  • 200

    Successfully response object.

POST/uploadClientOrders
Shell cURL
curl --request POST \
  --url https://us-central1-chazki-link-beta.cloudfunctions.net/uploadClientOrders \
  --header 'Content-Type: application/json' \
  --data '{
  "enterpriseKey": "1fb07e7c-eca2-45c1-b743-16130ff3212e",
  "orders": [
    {
      "trackCode": "ABCDEFI-1235",
      "paymentMethodID": "PAGADO",
      "paymentProofID": "BOLETA",
      "serviceID": "SAME DAY",
      "packageEnvelope": "Caja",
      "packageWeight": 1,
      "packageSizeID": "XL",
      "packageQuantity": 1,
      "productDescription": "xxxxxxxxxxxxxxx",
      "productPrice": 0,
      "reverseLogistic": "NO",
      "crossdocking": "NO",
      "pickUpBranchID": "",
      "pickUpAddress": "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "pickUpPostalCode": "000000",
      "pickUpAddressReference": "-",
      "pickUpPrimaryReference": "Distrito",
      "pickUpSecondaryReference": "Departamento",
      "pickUpNotes": "",
      "pickUpContactName": "xxxxx yyyyy",
      "pickUpContactPhone": "12345678",
      "pickUpContactDocumentTypeID": "RUC",
      "pickUpContactDocumentNumber": "12345678",
      "pickUpContactEmail": "xxxxxx@yyyyy.zzz",
      "dropBranchID": "",
      "dropAddress": "Direccion",
      "dropPostalCode": "000000",
      "dropAddressReference": "Referencia",
      "dropPrimaryReference": "Distrito",
      "dropSecondaryReference": "Departamento",
      "dropNotes": "Notas",
      "dropContactName": "CONTACTO",
      "dropContactPhone": "12345678 ",
      "dropContactDocumentTypeID": "DNI",
      "dropContactDocumentNumber": "12345678",
      "dropContactEmail": "xxxxxx@yyyyy.zzz",
      "pickUpPoint": [
        -99.17644241,
        19.509946148
      ],
      "dropPoint": [
        -99.17644241,
        19.509946148
      ],
      "shipmentPrice": 0,
      "pickUpLandMark": "Tienda ABCD #0000",
      "packages": [
        {
          "clientPackageID": "68473029",
          "envelope": "Caja",
          "weight": 10,
          "weightUnit": "kg",
          "size": "M",
          "quantity": 1,
          "name": "HELADO OREO MICHA",
          "currency": "MXN",
          "unitaryProductPrice": "38.5"
        }
      ]
    }
  ]
}'
{
  "success": true,
  "ordersWithErrors": 0,
  "ordersWithoutErrors": 1,
  "errorsDetails": []
}

/uploadClientOriginalOrders

Este endpoint permite registrar un originalOrder from Integration. Dado que en el los datos se puegen agrupar en un arreglo, se pueden registrar varios originalOrder

Body
application/json
enterpriseKey
required
string

Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Example1fb07e7c-eca2-45c1-b743-16130ff3212e
orders
array object[]
Responses
  • 200

    Successfully response object.

POST/uploadClientOriginalOrders
Shell cURL
curl --request POST \
  --url https://us-central1-chazki-link-beta.cloudfunctions.net/uploadClientOriginalOrders \
  --header 'Content-Type: application/json' \
  --data '{
  "enterpriseKey": "1fb07e7c-eca2-45c1-b743-16130ff3212e",
  "orders": [
    {
      "trackCode": "ABCDEFI-1235",
      "paymentMethodID": "PAGADO",
      "paymentProofID": "BOLETA",
      "serviceID": "SAME DAY",
      "packageEnvelope": "Caja",
      "packageWeight": 1,
      "packageSizeID": "XL",
      "packageQuantity": 1,
      "productDescription": "xxxxxxxxxxxxxxx",
      "productPrice": 0,
      "reverseLogistic": "NO",
      "crossdocking": "NO",
      "pickUpBranchID": "",
      "pickUpAddress": "XXXXXXXXXXXXXXXXXXXXXXXXX",
      "pickUpPostalCode": "000000",
      "pickUpAddressReference": "-",
      "pickUpPrimaryReference": "Distrito",
      "pickUpSecondaryReference": "Departamento",
      "pickUpNotes": "",
      "pickUpContactName": "xxxxx yyyyy",
      "pickUpContactPhone": "12345678",
      "pickUpContactDocumentTypeID": "RUC",
      "pickUpContactDocumentNumber": "12345678",
      "pickUpContactEmail": "xxxxxx@yyyyy.zzz",
      "dropBranchID": "",
      "dropAddress": "Direccion",
      "dropPostalCode": "000000",
      "dropAddressReference": "Referencia",
      "dropPrimaryReference": "Distrito",
      "dropSecondaryReference": "Departamento",
      "dropNotes": "Notas",
      "dropContactName": "CONTACTO",
      "dropContactPhone": "12345678 ",
      "dropContactDocumentTypeID": "DNI",
      "dropContactDocumentNumber": "12345678",
      "dropContactEmail": "xxxxxx@yyyyy.zzz",
      "pickUpPoint": [
        -99.17644241,
        19.509946148
      ],
      "dropPoint": [
        -99.17644241,
        19.509946148
      ],
      "shipmentPrice": 0,
      "packages": [
        {
          "clientPackageID": "68473029",
          "envelope": "Caja",
          "weight": 10,
          "weightUnit": "kg",
          "size": "M",
          "quantity": 1,
          "name": "HELADO OREO MICHA",
          "currency": "MXN",
          "unitaryProductPrice": "38.5"
        }
      ]
    }
  ]
}'
{
  "success": true,
  "ordersWithErrors": 0,
  "ordersWithoutErrors": 1,
  "errorsDetails": []
}

/cancelOrderForIntegration

The endpoint allows to cancel an order by integration. As long as the order is not in a completed state

Body
application/json
enterpriseKey
required
string

Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Example1fb07e7c-eca2-45c1-b743-16130ff3212e
trackCode
required
string

Delivery track code.

ExampleABCDEFI
Responses
  • 200

    Successfully response object.

POST/cancelOrderForIntegration
Shell cURL
curl --request POST \
  --url https://us-central1-chazki-link-beta.cloudfunctions.net/cancelOrderForIntegration \
  --header 'Content-Type: application/json' \
  --data '{
  "enterpriseKey": "1fb07e7c-eca2-45c1-b743-16130ff3212e",
  "trackCode": "ABCDEFI"
}'
{
  "success": true,
  "message": "Cancelled Order"
}

/fnTrackOrderChazkiPosition

This API allows us to see all the Chazki movements and the delivery state.

Query Parameters
  • code
    required
    string

    Delivery track code.

  • enterpriseKey
    required
    string

    Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

GET/fnTrackOrderChazkiPosition
Shell cURL
curl --request GET \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/fnTrackOrderChazkiPosition?code=&enterpriseKey='
{
  "response": 1,
  "position": {
    "latitude": -12.046502,
    "longitude": -77.042716
  },
  "status": "ASSIGNED",
  "timestamp": "2020-04-30T00:00:00.000Z",
  "rd": "Nombre repartidor"
}

/fnOrderHistorialPublic

This API allows us to see all the states the delivery passed group by services.The services group reference the number of attempts made to deliver the delivery.

Query Parameters
  • code
    required
    string

    Delivery track code.

  • enterpriseKey
    required
    string

    Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

GET/fnOrderHistorialPublic
Shell cURL
curl --request GET \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/fnOrderHistorialPublic?code=&enterpriseKey='
{
  "response": 1,
  "descriptionResponse": "SUCCESS",
  "message": "",
  "service": [
    {
      "status": "NEW",
      "date": "2020-04-30T00:00:00.000Z",
      "reason": ""
    }
  ]
}

/fnOrderHistorialPrivate

This API allows us to see all the states the delivery passed through.The number of the attempt made to deliver the delivery is shown in each change of status.

Query Parameters
  • code
    required
    string

    Delivery track code.

  • enterpriseKey
    required
    string

    Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

GET/fnOrderHistorialPrivate
Shell cURL
curl --request GET \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/fnOrderHistorialPrivate?code=&enterpriseKey='
{
  "response": 1,
  "descriptionResponse": "SUCCESS",
  "message": "",
  "service": [
    {
      "status": "NEW",
      "date": "2020-04-30T00:00:00.000Z",
      "reason": ""
    }
  ]
}

/fnOrderImages

This API allow us to see the pictures taken by the chazki at the delivery momment.

Query Parameters
  • code
    required
    string

    Delivery track code.

  • enterpriseKey
    required
    string

    Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Responses
  • 200

    Successfully response object.

  • 400

    Query response with errors.

GET/fnOrderImages
Shell cURL
curl --request GET \
  --url 'https://us-central1-chazki-link-beta.cloudfunctions.net/fnOrderImages?code=&enterpriseKey='
{
  "response": 1,
  "deliveryResponse": "SUCCESS",
  "orderImages": [
    "iVBORw0KGgoAAAANSUhEUgAAAl8AAAQ4CAIAAAC4"
  ]
}

PDFServices

PDF creator endpoints.

PDFAtariServices

PDF creator endpoints.

/createAtariPDFFromCSV

This endpoint allows to create PDF From CSV file

Body
application/json
filename
string

It's the name that was saved into the Firebase Storage.

Examplecsv/2021-11-24T18-35-32-846Zreturn_orders_falabella.csv
filenameUrl
string

Position on the storage

Examplecsv/2021-11-24T18-35-32-846Zreturn_orders_falabella.csv
Responses
  • 200

    Object with the PDF URL address.

  • 400

    If the filename does not exist in storage

POST/createAtariPDFFromCSV
Shell cURL
curl --request POST \
  --url https://us-central1-chazki-link-beta.cloudfunctions.net/createAtariPDFFromCSV \
  --header 'Content-Type: application/json' \
  --data '{
  "filename": "csv/2021-11-24T18-35-32-846Zreturn_orders_falabella.csv",
  "filenameUrl": "csv/2021-11-24T18-35-32-846Zreturn_orders_falabella.csv"
}'
No Body

Orders

{} Orders
enterpriseKey
required
string

Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Example1fb07e7c-eca2-45c1-b743-16130ff3212e
orders
array object[]

cancelOrderForIntegration

{} cancelOrderForIntegration
enterpriseKey
required
string

Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Example1fb07e7c-eca2-45c1-b743-16130ff3212e
trackCode
required
string

Delivery track code.

ExampleABCDEFI

uploadOriginalOrdersFromIntegration

{} uploadOriginalOrdersFromIntegration
enterpriseKey
required
string

Company identifier, it is a hash generated by Chazki to identify the company, it is obtained once the company has been generated within Chazki by the commercial area.

Example1fb07e7c-eca2-45c1-b743-16130ff3212e
orders
array object[]
  • Global Environment
    { "exampleKey": "exampleValue" }
  • Global Environment
    { "exampleKey": "exampleValue" }
{
"enterpriseKey": "1fb07e7c-eca2-45c1-b743-16130ff3212e",
"orders": [
{
"trackCode": "ABCDEFI-1235",
"paymentMethodID": "PAGADO",
"paymentProofID": "BOLETA",
"serviceID": "SAME DAY",
"packageEnvelope": "Caja",
"packageWeight": 1,
"packageSizeID": "XL",
"packageQuantity": 1,
"productDescription": "xxxxxxxxxxxxxxx",
"productPrice": 0,
"reverseLogistic": "NO",
"crossdocking": "NO",
"pickUpBranchID": "",
"pickUpAddress": "XXXXXXXXXXXXXXXXXXXXXXXXX",
"pickUpPostalCode": "000000",
"pickUpAddressReference": "-",
"pickUpPrimaryReference": "Distrito",
"pickUpSecondaryReference": "Departamento",
"pickUpNotes": "",
"pickUpContactName": "xxxxx yyyyy",
"pickUpContactPhone": "12345678",
"pickUpContactDocumentTypeID": "RUC",
"pickUpContactDocumentNumber": "12345678",
"pickUpContactEmail": "xxxxxx@yyyyy.zzz",
"dropBranchID": "",
"dropAddress": "Direccion",
"dropPostalCode": "000000",
"dropAddressReference": "Referencia",
"dropPrimaryReference": "Distrito",
"dropSecondaryReference": "Departamento",
"dropNotes": "Notas",
"dropContactName": "CONTACTO",
"dropContactPhone": "12345678 ",
"dropContactDocumentTypeID": "DNI",
"dropContactDocumentNumber": "12345678",
"dropContactEmail": "xxxxxx@yyyyy.zzz",
"pickUpPoint": [
-99.17644241,
19.509946148
],
"dropPoint": [
-99.17644241,
19.509946148
],
"shipmentPrice": 0,
"pickUpLandMark": "Tienda ABCD #0000",
"packages": [
{
"clientPackageID": "68473029",
"envelope": "Caja",
"weight": 10,
"weightUnit": "kg",
"size": "M",
"quantity": 1,
"name": "HELADO OREO MICHA",
"currency": "MXN",
"unitaryProductPrice": "38.5"
}
]
}
]
}
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