99 Minutos webhooks API

The webhooks API from 99 Minutos — 3 operation(s) for webhooks.

OpenAPI Specification

99-minutos-webhooks-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: API Version 3 coverage webhooks API
  version: 3.0.0
  description: "This is the documentation for the public api *(version 3)* of 99minutos. [https://www.99minutos.com/.](https://www.99minutos.com/.EnvironmentAPI)\n\n# First Steps\n\n1.  Create an account in the sandbox website: [https://delivery-git-sandbox-99minutos.vercel.app/](https://delivery-git-sandbox-99minutos.vercel.app/)\n2.  Go to Developers section\n3.  On API Keys V3 section click on `Generar`\n4.  After this the `client_id` and `client_secret` will be displayed\n    \n\nUse the credentials to generate access tokens as shown below in the endpoint `create access token`\n\nFollow the same process in production.\n\n## Environments\n\n| **Environment** | **Website** | **API url** |\n| --- | --- | --- |\n| Sandbox | [https://delivery-git-sandbox-99minutos.vercel.app/](https://delivery-git-sandbox-99minutos.vercel.app/) | [https://sandbox.99minutos.com](https://sandbox.99minutos.com) |\n| Production | [https://envios.99minutos.com/developers](https://envios.99minutos.com/developers) | [https://delivery.99minutos.com](https://delivery.99minutos.com) |\n\n`Each environment has an independent set of credentials`"
servers:
- url: https://delivery.99minutos.com
  description: Produccion
- url: https://sandbox.99minutos.com
  description: Sandbox Environment
tags:
- name: webhooks
paths:
  /api/v3/webhooks:
    post:
      summary: ''
      operationId: post-api-v3-webhooks
      responses:
        '200':
          $ref: '#/components/responses/ConfigResponse'
      description: "Submit a new webhook configuration. You can set 2 settings at most.\n\nwebhook notification example:\n\n```json\n{\n  \"StatusName\": \"stored\", // Current status of the order, the complete list of events at the tracking endpoint, are sent in camelCase.\n  \"TrackingId\": \"2139671481\", // Identifier generated by 99minutos\n  \"InternalKey\": \"SOME_ID\", // Identifier sent by the customer\n  \"Events\": [ // List of events through which the shipment has transited in ascending order \n    {\n      \"StatusCode\": \"1002\",\n      \"StatusName\": \"confirmed\",\n      \"Data\": {\n        \"comment\": \"NEW_ORDER_CONFIRMED\", // Additional event information\n        \"evidence\": [] // Evidence of transition, applies only to delivery events, failed delivery attempts and pickup.\n      },\n      \"CreatedAt\": \"2023-01-02 23:55:39\" // UTC Time\n    },\n    {\n      \"StatusCode\": \"2003\",\n      \"StatusName\": \"collected\",\n      \"Data\": {\n        \"comment\": \"Recolectada por el veloz Don Veloz N/A 99m B 2eeb2a6\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-03 20:12:43\"\n    },\n    {\n      \"StatusCode\": \"3001\",\n      \"StatusName\": \"stored\",\n      \"Data\": {\n        \"comment\": \"En estación MX5 por módulo de inducción\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-03 22:20:02\"\n    },\n    {\n      \"StatusCode\": \"3004\",\n      \"StatusName\": \"onLinehaul\",\n      \"Data\": {\n        \"comment\": \"En camino a estación Tultitlán desde estación Pantaco por jhon.doe el número de orden 2139671481\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-04 01:13:46\"\n    },\n    {\n      \"StatusCode\": \"3001\",\n      \"StatusName\": \"stored\",\n      \"Data\": {\n        \"comment\": \"En estación MX0 por módulo de inducción\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-04 04:17:42\"\n    },\n    {\n      \"StatusCode\": \"3002\",\n      \"StatusName\": \"onContainer\",\n      \"Data\": {\n        \"comment\": \"Contenerizado en la estación MX0 en el contenedor VQA-319 en el finger F1\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-04 06:28:12\"\n    },\n    {\n      \"StatusCode\": \"3003\",\n      \"StatusName\": \"chargedToVehicle\",\n      \"Data\": {\n        \"comment\": \"Subida al line haul del veloz Jhon Doe con las placas LA37321 en la estacion MX0 dentro del contenedor VQA-319\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-05 05:13:24\"\n    },\n    {\n      \"StatusCode\": \"3004\",\n      \"StatusName\": \"onLinehaul\",\n      \"Data\": {\n        \"comment\": \"Despachado de la estación MX0 hacia la estación MCH2, en el line haul del veloz Jhon Doe con las placas LA37321 en el contenedor VQA-319\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-05 06:31:29\"\n    },\n    {\n      \"StatusCode\": \"3001\",\n      \"StatusName\": \"stored\",\n      \"Data\": {\n        \"comment\": \"En estación final MCH2 por módulo de inducción\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-05 16:37:06\"\n    },\n    {\n      \"StatusCode\": \"4001\",\n      \"StatusName\": \"onRoadToDelivery\",\n      \"Data\": {\n        \"comment\": \"Asignada a entrega en la estación  al veloz Jhon. Ruta: 49b91331-2be0-2fd4-9b25-1accc772f937\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-05 16:01:40\"\n    },\n    {\n      \"StatusCode\": \"4002\",\n      \"StatusName\": \"delivered\",\n      \"Data\": {\n        \"comment\": \"Titular - Carlos Ramirez | <<CP>>\",\n        \"evidence\": [\n          \"https://copilot-image-proxy-qndxoltwga-uc.a.run.app/view/62b6fec1836a6321a5ca5a4a.jpeg\", // url to the photo of the evidences\n          \"https://copilot-image-proxy-qndxoltwga-uc.a.run.app/view/63b1fec1b030b63f06db10a5.jpeg\",\n          \"https://copilot-image-proxy-qndxoltwga-uc.a.run.app/view/62b1fab2b031b63d01da31b7.jpeg\"\n        ]\n      },\n      \"CreatedAt\": \"2023-01-05 16:45:54\"\n    }\n    // You can have n events until delivery or return.\n  ]\n}\n```"
      security:
      - AuthJWT: []
      tags:
      - webhooks
      requestBody:
        $ref: '#/components/requestBodies/Config'
    get:
      summary: ''
      operationId: get-api-v3-webhooks
      responses:
        '200':
          $ref: '#/components/responses/ConfigGetResponse'
      description: "Get webhooks configurations\n\nwebhook notification example:\n\n```json\n{\n  \"StatusName\": \"stored\", // Current status of the order, the complete list of events at the tracking endpoint, are sent in camelCase.\n  \"TrackingId\": \"2139671481\", // Identifier generated by 99minutos\n  \"InternalKey\": \"SOME_ID\", // Identifier sent by the customer\n  \"Events\": [ // List of events through which the shipment has transited in ascending order \n    {\n      \"StatusCode\": \"1002\",\n      \"StatusName\": \"confirmed\",\n      \"Data\": {\n        \"comment\": \"NEW_ORDER_CONFIRMED\", // Additional event information\n        \"evidence\": [] // Evidence of transition, applies only to delivery events, failed delivery attempts and pickup.\n      },\n      \"CreatedAt\": \"2023-01-02 23:55:39\" // UTC Time\n    },\n    {\n      \"StatusCode\": \"2003\",\n      \"StatusName\": \"collected\",\n      \"Data\": {\n        \"comment\": \"Recolectada por el veloz Don Veloz N/A 99m B 2eeb2a6\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-03 20:12:43\"\n    },\n    {\n      \"StatusCode\": \"3001\",\n      \"StatusName\": \"stored\",\n      \"Data\": {\n        \"comment\": \"En estación MX5 por módulo de inducción\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-03 22:20:02\"\n    },\n    {\n      \"StatusCode\": \"3004\",\n      \"StatusName\": \"onLinehaul\",\n      \"Data\": {\n        \"comment\": \"En camino a estación Tultitlán desde estación Pantaco por jhon.doe el número de orden 2139671481\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-04 01:13:46\"\n    },\n    {\n      \"StatusCode\": \"3001\",\n      \"StatusName\": \"stored\",\n      \"Data\": {\n        \"comment\": \"En estación MX0 por módulo de inducción\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-04 04:17:42\"\n    },\n    {\n      \"StatusCode\": \"3002\",\n      \"StatusName\": \"onContainer\",\n      \"Data\": {\n        \"comment\": \"Contenerizado en la estación MX0 en el contenedor VQA-319 en el finger F1\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-04 06:28:12\"\n    },\n    {\n      \"StatusCode\": \"3003\",\n      \"StatusName\": \"chargedToVehicle\",\n      \"Data\": {\n        \"comment\": \"Subida al line haul del veloz Jhon Doe con las placas LA37321 en la estacion MX0 dentro del contenedor VQA-319\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-05 05:13:24\"\n    },\n    {\n      \"StatusCode\": \"3004\",\n      \"StatusName\": \"onLinehaul\",\n      \"Data\": {\n        \"comment\": \"Despachado de la estación MX0 hacia la estación MCH2, en el line haul del veloz Jhon Doe con las placas LA37321 en el contenedor VQA-319\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-05 06:31:29\"\n    },\n    {\n      \"StatusCode\": \"3001\",\n      \"StatusName\": \"stored\",\n      \"Data\": {\n        \"comment\": \"En estación final MCH2 por módulo de inducción\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-05 16:37:06\"\n    },\n    {\n      \"StatusCode\": \"4001\",\n      \"StatusName\": \"onRoadToDelivery\",\n      \"Data\": {\n        \"comment\": \"Asignada a entrega en la estación  al veloz Jhon. Ruta: 49b91331-2be0-2fd4-9b25-1accc772f937\",\n        \"evidence\": []\n      },\n      \"CreatedAt\": \"2023-01-05 16:01:40\"\n    },\n    {\n      \"StatusCode\": \"4002\",\n      \"StatusName\": \"delivered\",\n      \"Data\": {\n        \"comment\": \"Titular - Carlos Ramirez | <<CP>>\",\n        \"evidence\": [\n          \"https://copilot-image-proxy-qndxoltwga-uc.a.run.app/view/62b6fec1836a6321a5ca5a4a.jpeg\", // url to the photo of the evidences\n          \"https://copilot-image-proxy-qndxoltwga-uc.a.run.app/view/63b1fec1b030b63f06db10a5.jpeg\",\n          \"https://copilot-image-proxy-qndxoltwga-uc.a.run.app/view/62b1fab2b031b63d01da31b7.jpeg\"\n        ]\n      },\n      \"CreatedAt\": \"2023-01-05 16:45:54\"\n    }\n    // You can have n events until delivery or return.\n  ]\n}\n```"
      security:
      - AuthJWT: []
      tags:
      - webhooks
  /api/v3/webhooks/{webhook_id}:
    parameters:
    - schema:
        type: string
        format: uuid
        example: 4c136c4a-cdf6-4b37-879e-f0c4a1082856
      name: webhook_id
      in: path
      required: true
      description: Webhook uuid
    patch:
      summary: ''
      operationId: patch-api-v3-webhooks-webhook_id
      responses:
        '200':
          $ref: '#/components/responses/ConfigResponse'
      description: "Update webhook configuration. You can update headers or/and status_rules.\n\nwebhook notification example:\n\n```json\n{\n  \"headers\": {\n    \"Content-Type\": \"application/json\" // Change the headers\n  },\n  \"status_rules\": {\n    \"status_version\": 2, // Change status version\n    \"allowed_status_names\": [\n      \"delivered\"   // Change the allowed status names\n    ]\n  }\n}\n```"
      tags:
      - webhooks
      security:
      - AuthJWT: []
    delete:
      summary: ''
      operationId: delete-api-v3-webhooks-webhook_id
      responses:
        '200':
          $ref: '#/components/responses/DeleteConfigResponse'
      description: Delete webhook config by id
      tags:
      - webhooks
      security:
      - AuthJWT: []
  /api/v3/webhooks/evidences/{tracking_id}:
    parameters:
    - schema:
        type: string
        example: 9107062174
      name: tracking_id
      in: path
      required: true
      description: Tracking id
    get:
      summary: ''
      operationId: get-api-v3-webhooks-evidences-by-tracking-id
      responses:
        '200':
          $ref: '#/components/responses/Notification'
      description: Get evidences by trackingId
      security:
      - AuthJWT: []
      tags:
      - webhooks
components:
  securitySchemes:
    AuthJWT:
      type: http
      scheme: bearer
      bearerFormat: JWT