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

Create Fulfillment Order

POST /api/rest/orders

Description:

The order creation endpoint allows you to create a new fulfillment order in the Rayo system. You need to provide the following information:

  • Your Rayo JWT Token
  • the customer's identification information
  • the customer's shipping address
  • the items to be included in the order,
  • the shipping service to be used (national, scheduled or express).
Parameter Description


productos (Array) - Required



product Array from shopping cart



cantidad (integer) - Required



amount of products for indicated “identificador”



identificador (String) - Required



identifier to each product (SKU or UPC)



consumidor_destino (Object) - Required



consumer shipping information



calle (String) - Required



street name



codigo_postal (String) - Required



postal code / zip-code



no_exterior (String) - Required



house number



no_interior (String) - Required



internal number / references



estado (String) - Required



State / Province



ciudad (String) - Required



City / Municipality



nombre (String) - Required



customer name



telefono (String) - Required



customer phone number (WhatsApp enabled)



servicio_rayo (String) - Required



quoted service to be used NACIONAL, EXPRESS or PROGRAMADO

POST /api/rest/orders
curl \
 -X POST cerebro.techrayo.com/api/rest/orders