application/json

Body Required

  • consumidor_destino object Required

    Additional properties are allowed.

    Hide consumidor_destino attributes Show consumidor_destino attributes object
    • calle string Required
    • ciudad string Required
    • codigo_postal string Required
    • colonia string Required
    • estado string Required
    • no_exterior string Required
    • no_interior string | null
    • nombre string Required
    • pais string Required
    • telefono string Required
  • productos array[object] Required

    At least 1 element.

    Hide productos attributes Show productos attributes object
    • cantidad integer Required

      Minimum value is 1.

    • identificador string Required

      Product identifier (SKU/barcode/EAN/etc.)

  • servicio_rayo string

    Rayo service level. Common values: NACIONAL, EXPRESS, PROGRAMADA. Defaults to NACIONAL. No enum validation is enforced by the API.

    Default value is NACIONAL.

Responses

  • 200 application/json

    Order created successfully

    Hide response attribute Show response attribute object
    • orden object Required

      Additional properties are NOT allowed.

      Hide orden attribute Show orden attribute object
      • ordenRef string(uuid) Required

        Order reference UUID

  • default application/json

    Unexpected error

    Hide response attributes Show response attributes object
    • error string Required
    • code string Required
    • path string
POST /api/rest/orders
curl \
 --request POST 'https://cerebro.techrayo.com/api/rest/orders' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"productos":[{"cantidad":1,"identificador":"7503039461000"}],"servicio_rayo":"NACIONAL","consumidor_destino":{"pais":"mexico","calle":"bahía de todos los santos","ciudad":"Portales","estado":"DF","nombre":"prueba .","colonia":"bahia","telefono":"5565320691","no_exterior":"87","codigo_postal":"11300"}}'
Request example
{
  "productos": [
    {
      "cantidad": 1,
      "identificador": "7503039461000"
    }
  ],
  "servicio_rayo": "NACIONAL",
  "consumidor_destino": {
    "pais": "mexico",
    "calle": "bahía de todos los santos",
    "ciudad": "Portales",
    "estado": "DF",
    "nombre": "prueba .",
    "colonia": "bahia",
    "telefono": "5565320691",
    "no_exterior": "87",
    "codigo_postal": "11300"
  }
}
Response examples (200)
{
  "orden": {
    "ordenRef": "909521d0-e398-4701-b393-ddfd07ce24f9"
  }
}
Response examples (default)
{
  "error": "internal error",
  "code": "unexpected",
  "path": "$"
}