Rayo API
1.0.1

API Reference

The Rayo API is based on REST. It has easy to understand URLs, accepts JSON request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

You can use the Rayo API in QA for Sandbox testing purposes , which doesn't affect your live data or interact with the fulfillment networks. The host and API key you use to authenticate the request determines whether the request is production mode or QA mode.

The Rayo API differs for every account as we release new versions and tailor functionality.

Authentication

The Rayo API uses API keys to generate JWT to authenticate requests. You can view and manage your API keys in Rayo AVA account.

Your API keys have your role and permissions set up to the account level you are subscribed to. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so on.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Host URLs

Production -> https://cerebro.techrayo.com

QA/Sandbox -> https://qa.cerebro.techrayo.com

Considerations
  1. Products
    1. You need to have products set up correctly
      1. SKU and UPC (unique product identifiers)
      2. Dimensions set up properly
  2. Inventories
    1. You need to have stock of the products in the designated warehouse
  3. Express/Scheduled zip codes coverage
    1. This service type requires to have warehouse coverage to the desired zip codes
      1. Validate with your Rayo Account Manager all the coverages for our fulfillment warehouse network
  4. Packaging Materials
    1. You need to have packaging material stock within our warehouses
      1. Verify with your Rayo Account Manager if your plan includes Rayo packaging materials
    2. Dimensions and details must be set up properly in order to quote and create fulfillment orders
  5. JWT Tokens
    1. Tokens have expiration times
    2. You need to refresh your token with the given keys by the Rayo Account Manager
  6. Errors
    1. Errors can be reported through support tickets in order to be addressed as soon as possible by the Dev Team
  7. Rates
    1. Rates are assigned to your account by your Rayo Account Manager
  8. Shipping Providers
    1. Shipping Providers are assigned to your account by your Rayo Account Manager, any required changes please contact via support ticket.
  9. API Keys
    1. In order to generate the API Key to generate JWT Tokens you need to have an active Rayo Account
      1. Contact Sales team in order to start the process here

This is the documentation for version 1.0.1 of the API. Last update on Jun 9, 2022.

Base URL
cerebro.techrayo.com

View Pickup Orders

GET /api/rest/pickup-order

Description:

The view pickup orders endpoint allows you to view all product pickup orders completed within fulfillment network warehouses in the Rayo system. You need to provide the following information:

  • Your Rayo JWT Token
GET /api/rest/pickup-order
curl \
 -X GET cerebro.techrayo.com/api/rest/pickup-order \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
# Headers
Date: Mon, 30 May 2022 18:48:27 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
x-request-id: be1c40ef411c65a026ac64b73369c2de
Content-Encoding: gzip
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Content-Security-Policy: upgrade-insecure-requests
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
Server: cloudflare
CF-RAY: 7139a4e36e40fed6-IAH

# Payload
{
  "ordenes_salida": [
    {
      "id": "80cbfa61-cdc4-432a-80e3-d887390781df",
      "fecha_creacion": "2022-04-27T18:01:46.909045+00:00",
      "detalle_orden_salidas": [
        {
          "producto": {
            "sku": "Balon",
            "nombre": "Balon de futbol"
          },
          "recogido": true
        }
      ],
      "estados": [
        {
          "estado": "WAITING",
          "timestamp": "2022-04-27T18:01:46.909045+00:00"
        },
        {
          "estado": "PICK",
          "timestamp": "2022-04-29T17:18:40.387813+00:00"
        },
        {
          "estado": "READY_TO_GO",
          "timestamp": "2022-04-29T17:19:27.366837+00:00"
        },
        {
          "estado": "COMPLETED",
          "timestamp": "2022-04-29T17:19:44.465248+00:00"
        }
      ],
      "almacen": {
        "nombre_almacen": "Enviatodo.com",
        "telefono": "8118791968"
      },
      "razon": "Por que ya no tiene en la tienda",
      "comentarios": "Tener cuidado",
      "fecha_recoleccion": "2022-04-27T19:04:00+00:00",
      "recolector": "Raul Jimenez"
    },
    {
      "id": "856a25ea-7a3b-4bdd-9a6f-308a800a0c7a",
      "fecha_creacion": "2022-04-27T21:37:57.289366+00:00",
      "detalle_orden_salidas": [
        {
          "producto": {
            "sku": "Balon",
            "nombre": "Balon de futbol"
          },
          "recogido": true
        }
      ],
      "estados": [
        {
          "estado": "WAITING",
          "timestamp": "2022-04-27T21:37:57.289366+00:00"
        },
        {
          "estado": "PICK",
          "timestamp": "2022-04-27T21:38:58.169859+00:00"
        },
        {
          "estado": "READY_TO_GO",
          "timestamp": "2022-04-27T21:52:01.21282+00:00"
        },
        {
          "estado": "COMPLETED",
          "timestamp": "2022-04-27T21:52:22.635739+00:00"
        }
      ],
      "almacen": {
        "nombre_almacen": "Enviatodo.com",
        "telefono": "8118791968"
      },
      "razon": "Fallas de fabrica",
      "comentarios": "Tener cuidado con el inventario",
      "fecha_recoleccion": "2022-04-27T22:00:00+00:00",
      "recolector": "Iker Casillas"
    },
    {
      "id": "305bee7b-a8bb-4e99-8c73-afa843e3d948",
      "fecha_creacion": "2022-04-28T15:57:08.392146+00:00",
      "detalle_orden_salidas": [
        {
          "producto": {
            "sku": "GC-BLANCO",
            "nombre": "Grand Court Blancos"
          },
          "recogido": true
        }
      ],
      "estados": [
        {
          "estado": "WAITING",
          "timestamp": "2022-04-28T15:57:08.392146+00:00"
        },
        {
          "estado": "PICK",
          "timestamp": "2022-04-28T15:57:45.220247+00:00"
        },
        {
          "estado": "READY_TO_GO",
          "timestamp": "2022-04-28T15:59:18.824469+00:00"
        },
        {
          "estado": "COMPLETED",
          "timestamp": "2022-04-28T15:59:41.240585+00:00"
        }
      ],
      "almacen": {
        "nombre_almacen": "Enviatodo.com",
        "telefono": "8118791968"
      },
      "razon": "Test",
      "comentarios": "Ola",
      "fecha_recoleccion": "2022-04-29T17:00:00+00:00",
      "recolector": "Dwayne Johnson"
    },
    {
      "id": "84b36473-6d86-44fe-998f-6613340c3868",
      "fecha_creacion": "2022-04-28T16:30:37.14117+00:00",
      "detalle_orden_salidas": [
        {
          "producto": {
            "sku": "GORRA-EU-01",
            "nombre": "gorra europea"
          },
          "recogido": true
        },
        {
          "producto": {
            "sku": "001test",
            "nombre": "promocion"
          },
          "recogido": true
        }
      ],
      "estados": [
        {
          "estado": "WAITING",
          "timestamp": "2022-04-28T16:30:37.14117+00:00"
        },
        {
          "estado": "PICK",
          "timestamp": "2022-04-28T16:31:59.864314+00:00"
        },
        {
          "estado": "READY_TO_GO",
          "timestamp": "2022-04-28T16:42:29.902486+00:00"
        },
        {
          "estado": "COMPLETED",
          "timestamp": "2022-04-28T16:42:35.054058+00:00"
        }
      ],
      "almacen": {
        "nombre_almacen": "Enviatodo.com",
        "telefono": "8118791968"
      },
      "razon": "",
      "comentarios": "",
      "fecha_recoleccion": "2022-04-28T19:30:14+00:00",
      "recolector": "Mariana sanchez"
    },
    {
      "id": "ff79f9c4-3ebe-448a-987f-94abaacc197c",
      "fecha_creacion": "2022-04-28T16:32:14.889642+00:00",
      "detalle_orden_salidas": [
        {
          "producto": {
            "sku": "PUFF-NEG",
            "nombre": "Chamarra Puffer Negra"
          },
          "recogido": true
        }
      ],
      "estados": [
        {
          "estado": "WAITING",
          "timestamp": "2022-04-28T16:32:14.889642+00:00"
        },
        {
          "estado": "PICK",
          "timestamp": "2022-04-28T16:35:53.251656+00:00"
        },
        {
          "estado": "READY_TO_GO",
          "timestamp": "2022-04-28T16:36:20.167596+00:00"
        },
        {
          "estado": "COMPLETED",
          "timestamp": "2022-04-28T16:36:25.765984+00:00"
        }
      ],
      "almacen": {
        "nombre_almacen": "Enviatodo.com",
        "telefono": "8118791968"
      },
      "razon": "NA",
      "comentarios": "NA",
      "fecha_recoleccion": "2022-04-29T21:30:00+00:00",
      "recolector": "Clark Kent"
    },
    {
      "id": "651c48b8-91c1-420a-bd6b-181cb9483b17",
      "fecha_creacion": "2022-04-29T17:36:06.585417+00:00",
      "detalle_orden_salidas": [
        {
          "producto": {
            "sku": "001test",
            "nombre": "promocion"
          },
          "recogido": true
        }
      ],
      "estados": [
        {
          "estado": "WAITING",
          "timestamp": "2022-04-29T17:36:06.585417+00:00"
        },
        {
          "estado": "PICK",
          "timestamp": "2022-04-29T17:45:45.172726+00:00"
        },
        {
          "estado": "READY_TO_GO",
          "timestamp": "2022-04-29T17:46:19.048832+00:00"
        },
        {
          "estado": "COMPLETED",
          "timestamp": "2022-04-29T17:46:25.461439+00:00"
        }
      ],
      "almacen": {
        "nombre_almacen": "Enviatodo.com",
        "telefono": "8118791968"
      },
      "razon": "NO sirve",
      "comentarios": "danos",
      "fecha_recoleccion": "2022-05-03T17:35:00+00:00",
      "recolector": "Mariana"
    }
  ]
}