java node python go

Rappi API v1.8.0

Rappi API v1.8.0 includes all the resources, endpoints, and methods that enable you to integrate with the Rappi application.

The following table contains all the resources available to use with our API:

API Resource Endpoint Endpoint Description
Menus GET menu Returns the collection of menus created by the authenticating ally
POST menu Creates or updates a menu in a store
GET menu/approved/{storeId} Returns the current approval status of a menu
GET menu/rappi/{storeId} Returns the last menu created for a store
Orders GET orders Returns a list of new orders created
GET orders/status/sent Returns a list of new orders created in SENT
PUT orders/{orderId}/take/{cookingTime} Takes an order to start preparing
PUT orders/{orderId}/reject Rejects an order
POST orders/{orderId}/ready-for-pickup Confirms that the order is ready for pickup
GET orders/{orderId}/events Returns the latest events from the orders
Stores GET stores-pa Returns the list of stores for the authenticated client
PUT stores-pa/{storeId}/status Update a store to integrated or not integrated
Availability PUT availability/stores/items Manage item availability in the application by Item SKU
PUT availability/stores/items/rappi Manage item availability in the application by Item ID
PUT availability/stores Manage store availability in the application
Webhooks GET webhook/{event} Returns the webhooks configured for all the stores of the authenticated client
PUT webhook/{event}/add-stores Add stores to a specific webhook event
PUT webhook/{event}/change-url Change url from stores
POST webhook Creates a new webhook for a list of stores for the authenticated client
DELETE webhook/{event}/remove-stores Deletes stores from your webhook
PUT webhook/{event}/reset-secret Restarts the secret and generates a new one for the authenticated client
PUT webhook/{event}/change-status Enables or disables the webhooks for a list of stores

Getting Started

To start using the Rappi API you must sing up as a Rappi ally.

After signing up as a Rappy ally, you receive your Rappi Credentials that consist of the following:

Use these Rappi Credentials to create your Access Token with the POST token. After generating your Access Token, you can start using the Rappi API.

Authentication

To authenticate when making API requests to the Rappi API, you require an Access Token.

The Rappi API uses a Bearer authentication scheme, as the HTTP authentication method for API requests.

To make API requests, send the token in a customer header to interact with protected resources.

Rappi uses the following scheme for the Bearer authentication:

Key Value
x-authorization bearer [access_token]

POST token

Use this endpoint to generate an Access Token. This token enables you to authenticate when making API requests.

Endpoint URL

Use the following URLs to make a request with this endpoint:

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://rests-integrations-dev.auth0.com/oauth/token

This is an example of the request:

{
   "client_id":"7iCfjZCO4bTns3OjqLK4de2GV3sp6Ymd",
   "client_secret":"40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW",
   "audience":"https://int-public-api-v2/api",
   "grant_type":"client_credentials"
}
URL url = new URL("https://rests-integrations-dev.auth0.com/oauth/token");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setDoOutput(true);

final String jsonInputString = "{\n" +
                "   \"client_id\":\"7iCfjZCO4bTns3OjqLK4de2GV3sp6Ymd\",\n" +
                "   \"client_secret\":\"40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW\",\n" +
                "   \"audience\":\"https://int-public-api-v2/api\",\n" +
                "   \"grant_type\":\"client_credentials\"\n" +
                "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
import requests

url = "https://rests-integrations-dev.auth0.com/oauth/token"

payload = "{ \"client_id\":\"7iCfjZCO4bTns3OjqLK4de2GV3sp6Ymd\"," \
         "\"client_secret\":\"40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW\"," \
         "\"audience\":\"https://int-public-api-v2/api\"," \
         "\"grant_type\":\"client_credentials\"} "
headers = {
   'Content-Type': 'application/json',
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text.encode('utf8'))

var https = require('https');

var options = {
    'method': 'POST',
    'hostname': 'rests-integrations-dev.auth0.com',
    'path': '/oauth/token?',
    'headers': {
        'Content-Type': 'application/json',
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
        "client_id":"7iCfjZCO4bTns3OjqLK4de2GV3sp6Ymd",
        "client_secret":"40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW",
        "audience":"https://int-public-api-v2/api",
        "grant_type":"client_credentials"
    });

req.write(postData);

req.end();
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "strings"
)

func main() {

    url := "https://rests-integrations-dev.auth0.com/oauth/token"
    method := "POST"

    payload := strings.NewReader("{\n   " +
        "\"client_id\":\"7iCfjZCO4bTns3OjqLK4de2GV3sp6Ymd\",\n   " +
        "\"client_secret\":\"40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW40iFFYJV9A1LrVmJsaIeARW\",\n   " +
        "\"audience\":\"https://int-public-api-v2/api\",\n   " +
        "\"grant_type\":\"client_credentials\"\n}")

    client := &http.Client{
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
client_id
string
required Client Id of your Rappi Credentials.
client_secret
string
required Client Secret of your Rappi Credentials.
audience
string
required Identifier of the Rappi API.
grant_type
string
required Permission to request.

Sample Response

This is an example of the response:

{
   "access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpeyJhbGciOiJIUzI1NiIsInR5cCI6IkpeyJhbGciOiJIUzI1NiIsInR5cCI6Ikp",
   "scope":"integration:health-check",
   "expires_in":86400,
   "token_type":"Bearer"
}

This table describes the objects contained in the response example:

Response Object Object Description
access_token
string
Access token to access secure endpoints.
scope
string
Scope granted.
expires_in
integer
Token expiration time in seconds.
token_type
string
Token type.

Menus

The Menus resource enables you to interact with the menus of your stores.

The following table describes the different contents of the Menus resource:

Resource Description
GET menu Returns the collection of menus created by the authenticating ally
POST menu Creates or updates a menu in a store
GET menu/approved/{storeId} Returns the current approval status of a menu
GET menu/rappi/{storeId} Returns the last menu created for a store

GET menu

Use this endpoint to return the collection of menus created by the authenticating ally.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/menu

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
        new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
    StringBuilder response = new StringBuilder();
    String responseLine;
    while ((responseLine = br.readLine()) != null) {
        response.append(responseLine.trim());
    }
    System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu"

payload = {}
headers = {
    'Content-Type': 'application/json',
    'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
var https = require('https');

var options = {
  'method': 'GET',
  'hostname': 'microservices.dev.rappi.com',
  'path': '/api/v2/restaurants-integrations-public-api/menu',
  'headers': {
      'Content-Type': 'application/json',
      'x-authorization': 'bearer YOUR_TOKEN'
  }
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
      chunks.push(chunk);
  });

  res.on("end", function (chunk) {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
  });

  res.on("error", function (error) {
      console.error(error);
  });
});

req.end();
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response "Success 200":

This is an example of the response:

[
    {
        "storeId": "900111978",
        "items": [
            {
                "name": "Naked Cake con frutos",
                "description": "Naked cake decorado con frutos. Cubierta de trufa derretida (ganache) y decorada con frutos del bosque.",
                "sku": "8569874",
                "type": "PRODUCT",
                "price": 75.0,
                "category": {
                    "id": "3",
                    "name": "Tortas",
                    "minQty": 0,
                    "maxQty": 0,
                    "sortingPosition": 0
                },
                "imageUrl": "https://image.com/image1.jpg",
                "children": [
                    {
                        "name": "Chocolate",
                        "description": "",
                        "sku": "8569874-159",
                        "type": "TOPPING",
                        "price": 0.0,
                        "category": {
                            "id": "1",
                            "name": "Sabor",
                            "minQty": 0,
                            "maxQty": 1,
                            "sortingPosition": 0
                        },
                        "imageUrl": "https://image.com/image10.jpg",
                        "children": [],
                        "availableFrom": null,
                        "availableTo": null,
                        "rappiIds": [
                            "340948822"
                        ],
                        "sortingPosition": 1,
                        "maxLimit": 1
                    }
                ],
                "availableFrom": null,
                "availableTo": null,
                "rappiIds": [
                    "2135527868"
                ],
                "sortingPosition": 0,
                "maxLimit": 1
            },
            {
                "name": "Snowman",
                "description": "Linda lata de Snowman con productos variadosIncluye:Galletas mantequilla 350 gr, 6 brookies y 4 trufas de brownie.",
                "sku": "856887",
                "type": "PRODUCT",
                "price": 75.0,
                "category": {
                    "id": "9",
                    "name": "Navidad",
                    "minQty": 0,
                    "maxQty": 0,
                    "sortingPosition": 0
                },
                "imageUrl": "https://image.com/image2.jpg",
                "children": [],
                "availableFrom": null,
                "availableTo": null,
                "rappiIds": [
                    "2135524472"
                ],
                "sortingPosition": 0,
                "maxLimit": 1
            }
        ]
    }
]

This table describes the objects contained in the response example:

Response Object Object Description
storeId
string
Identifier of the store in the Rappi application.
items
array of objects
Product list
items.name
string
Name of the product in the menu
items.description
string
Description of the product in the menu
items.sku
string
SKU that the ally assigned for the product in the menu
items.type
string
Item type. In this case can be only PRODUCT
items.price
integer
Price of the product in the menu
items.imageUrl
string
Image url of the product in the menu
items.availableFrom
string
Start date from the product is available to sell in the menu
items.availableTo
string
End date from the product is available to sell in the menu
items.rappiIds
array of string
List of the identifiers Rappi gives to this item
items.sortingPosition
integer
The position of the product in its category
items.maxLimit
integer
Maximum indicator of the item, it's required only if the type is topping
items.category
string
Category of the product in the menu
items.category.id
string
The SKU (Stock-Keeping Unit) the ally gives to this category
items.category.name
string
Category name
items.category.minQty
integer
The maximum number of items that can be ordered in this category
items.category.maxQty
integer
The minimum quantity of elements that can be ordered in this category (In toppings, if it's 0 it means that it's not mandatory)
items.category.sortingPosition
integer
it's the position of the category in the menu
items.children
array of objects
List of product's toppings from the menu
items.children.name
string
Name of the topping in the menu
items.children.description
string
Description of the topping in the menu
items.children.sku
string
SKU that the ally assigned for the topping in the menu
items.children.type
string
Item type. In this case can be only TOPPING
items.children.price
integer
Price of the topping in the menu
items.children.imageUrl
string
Image url of the topping in the menu
items.children.availableFrom
string
Start date from the topping is available to sell in the menu
items.children.availableTo
string
End date from the topping is available to sell in the menu
items.children.rappiIds
array of string
List of the identifiers Rappi gives to this item
items.children.sortingPosition
integer
The position of the topping in its category
items.children.maxLimit
integer
Maximum indicator of the item, it's required only if the type is topping
items.children.category
string
Category of the topping in the menu
items.children.category.id
string
The SKU (Stock-Keeping Unit) the ally gives to this category
items.children.category.name
string
Category name
items.children.category.minQty
integer
The maximum number of items that can be ordered in this category
items.children.category.maxQty
integer
The minimum quantity of elements that can be ordered in this category (In toppings, if it's 0 it means that it's not mandatory)
items.children.category.sortingPosition
integer
The position of the category within the product

Sample Response "Invalid credentials 401":

{
    "message": "Not a valid token"
}

This table describes the attributes from JSON response:

Attributes Description
message
string
Not a valid token

POST menu

Use this endpoint to create a new menu, or to add new items to an existing one, for the authenticated ally.

After creating a menu, or adding new items to an existing one, the Rappi team validates the items and the structure of the menu. You can consult the status of the approval process by using the GET menu/approved/{storeId} endpoint.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/menu

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu

This is an example of the request:

{
  "storeId": "900103361",
  "items": [
    {
      "category": {
        "id": "2090019638",
        "maxQty": 0,
        "minQty": 0,
        "name": "Burgers",
        "sortingPosition": 0
      },
      "children": [
        {
          "category": {
            "id": "211",
            "maxQty": 1,
            "minQty": 0,
            "name": "Do you want to add?",
            "sortingPosition": 0
          },
          "children": [],
          "name": "French Fries",
          "price": 5000,
          "sku": "2135092195",
          "sortingPosition": 1,
          "type": "TOPPING",
          "maxLimit": 1
        },
        {
          "category": {
            "id": "211",
            "maxQty": 1,
            "minQty": 0,
            "name": "Do you want to add?",
            "sortingPosition": 0
          },
          "children": [],
          "name": "Potato Wedges",
          "price": 7000,
          "sku": "2135092196",
          "sortingPosition": 1,
          "type": "TOPPING",
          "maxLimit": 1
        }
      ],
      "name": "Grilled Chicken Burger",
      "price": 14000,
      "sku": "2135092197",
      "sortingPosition": 0,
      "type": "PRODUCT"
    },
    {
      "category": {
        "id": "2090019639",
        "maxQty": 0,
        "minQty": 0,
        "name": "Pizzas",
        "sortingPosition": 1
      },
      "children": [],
      "name": "Hawaiian Pizza",
      "price": 17000,
      "sku": "2135092198",
      "sortingPosition": 1,
      "type": "PRODUCT"
    }
  ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
        "  \"storeId\": \"900103361\",\n" +
        "  \"items\": [\n" +
        "    {\n" +
        "      \"category\": {\n" +
        "        \"id\": \"2090019638\",\n" +
        "        \"maxQty\": 0,\n" +
        "        \"minQty\": 0,\n" +
        "        \"name\": \"Burgers\",\n" +
        "        \"sortingPosition\": 0\n" +
        "      },\n" +
        "      \"children\": [\n" +
        "        {\n" +
        "          \"category\": {\n" +
        "            \"id\": \"211\",\n" +
        "            \"maxQty\": 1,\n" +
        "            \"minQty\": 0,\n" +
        "            \"name\": \"Do you want to add?\",\n" +
        "            \"sortingPosition\": 0\n" +
        "          },\n" +
        "          \"children\": [],\n" +
        "          \"name\": \"French Fries\",\n" +
        "          \"price\": 5000,\n" +
        "          \"sku\": \"2135092145\",\n" +
        "          \"sortingPosition\": 1,\n" +
        "          \"type\": \"TOPPING\",\n" +
        "          \"maxLimit\": 1\n" +
        "        },\n" +
        "        {\n" +
        "          \"category\": {\n" +
        "            \"id\": \"211\",\n" +
        "            \"maxQty\": 1,\n" +
        "            \"minQty\": 0,\n" +
        "            \"name\": \"Do you want to add?\",\n" +
        "            \"sortingPosition\": 0\n" +
        "          },\n" +
        "          \"children\": [],\n" +
        "          \"name\": \"Potato Wedges\",\n" +
        "          \"price\": 7000,\n" +
        "          \"sku\": \"2135092145\",\n" +
        "          \"sortingPosition\": 1,\n" +
        "          \"type\": \"TOPPING\",\n" +
        "          \"maxLimit\": 1\n" +
        "        }\n" +
        "      ],\n" +
        "      \"name\": \"Grilled Chicken Burger\",\n" +
        "      \"price\": 14000,\n" +
        "      \"sku\": \"2135092145\",\n" +
        "      \"sortingPosition\": 0,\n" +
        "      \"type\": \"PRODUCT\"\n" +
        "    },\n" +
        "    {\n" +
        "      \"category\": {\n" +
        "        \"id\": \"2090019639\",\n" +
        "        \"maxQty\": 0,\n" +
        "        \"minQty\": 0,\n" +
        "        \"name\": \"Pizzas\",\n" +
        "        \"sortingPosition\": 1\n" +
        "      },\n" +
        "      \"children\": [],\n" +
        "      \"name\": \"Hawaiian Pizza\",\n" +
        "      \"price\": 17000,\n" +
        "      \"sku\": \"2135092145\",\n" +
        "      \"sortingPosition\": 1,\n" +
        "      \"type\": \"PRODUCT\"\n" +
        "    }\n" +
        "  ]\n" +
        "}\n";

try (OutputStream os = connection.getOutputStream()) {
    byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
    os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
        new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
    StringBuilder response = new StringBuilder();
    String responseLine;
    while ((responseLine = br.readLine()) != null) {
        response.append(responseLine.trim());
    }
    System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'POST',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/menu',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify(
    {
        "storeId": "900103361",
        "items": [
            {
                "category": {
                    "id": "2090019638",
                    "maxQty": 0,
                    "minQty": 0,
                    "name": "Burgers",
                    "sortingPosition": 0
                },
                "children": [
                    {
                        "category": {
                            "id": "211",
                            "maxQty": 1,
                            "minQty": 0,
                            "name": "Do you want to add?",
                            "sortingPosition": 0
                        },
                        "children": [],
                        "name": "French Fries",
                        "price": 5000,
                        "sku": "2135092145",
                        "sortingPosition": 1,
                        "type": "TOPPING",
                        "maxLimit": 1
                    },
                    {
                        "category": {
                            "id": "211",
                            "maxQty": 1,
                            "minQty": 0,
                            "name": "Do you want to add?",
                            "sortingPosition": 0
                        },
                        "children": [],
                        "name": "Potato Wedges",
                        "price": 7000,
                        "sku": "2135092145",
                        "sortingPosition": 1,
                        "type": "TOPPING",
                        "maxLimit": 1
                    }
                ],
                "name": "Grilled Chicken Burger",
                "price": 14000,
                "sku": "2135092145",
                "sortingPosition": 0,
                "type": "PRODUCT"
            },
            {
                "category": {
                    "id": "2090019639",
                    "maxQty": 0,
                    "minQty": 0,
                    "name": "Pizzas",
                    "sortingPosition": 1
                },
                "children": [],
                "name": "Hawaiian Pizza",
                "price": 17000,
                "sku": "2135092145",
                "sortingPosition": 1,
                "type": "PRODUCT"
            }
        ]
    }
);

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu"

payload = "{\n" \
            "  \"storeId\": \"900103361\",\n" \
            "  \"items\": [\n" \
            "    {\n" \
            "      \"category\": {\n" \
            "        \"id\": \"2090019638\",\n" \
            "        \"maxQty\": 0,\n" \
            "        \"minQty\": 0,\n" \
            "        \"name\": \"Burgers\",\n" \
            "        \"sortingPosition\": 0\n" \
            "      },\n" \
            "      \"children\": [\n" \
            "        {\n" \
            "          \"category\": {\n" \
            "            \"id\": \"211\",\n" \
            "            \"maxQty\": 1,\n" \
            "            \"minQty\": 0,\n" \
            "            \"name\": \"Do you want to add?\",\n" \
            "            \"sortingPosition\": 0\n" \
            "          },\n" \
            "          \"children\": [],\n" \
            "          \"name\": \"French Fries\",\n" \
            "          \"price\": 5000,\n" \
            "          \"sku\": \"2135092145\",\n" \
            "          \"sortingPosition\": 1,\n" \
            "          \"type\": \"TOPPING\",\n" \
            "          \"maxLimit\": 1\n" \
            "        },\n" \
            "        {\n" \
            "          \"category\": {\n" \
            "            \"id\": \"211\",\n" \
            "            \"maxQty\": 1,\n" \
            "            \"minQty\": 0,\n" \
            "            \"name\": \"Do you want to add?\",\n" \
            "            \"sortingPosition\": 0\n" \
            "          },\n" \
            "          \"children\": [],\n" \
            "          \"name\": \"Potato Wedges\",\n" \
            "          \"price\": 7000,\n" \
            "          \"sku\": \"2135092145\",\n" \
            "          \"sortingPosition\": 1,\n" \
            "          \"type\": \"TOPPING\",\n" \
            "          \"maxLimit\": 1\n" \
            "        }\n" \
            "      ],\n" \
            "      \"name\": \"Grilled Chicken Burger\",\n" \
            "      \"price\": 14000,\n" \
            "      \"sku\": \"2135092145\",\n" \
            "      \"sortingPosition\": 0,\n" \
            "      \"type\": \"PRODUCT\"\n" \
            "    },\n" \
            "    {\n" \
            "      \"category\": {\n" \
            "        \"id\": \"2090019639\",\n" \
            "        \"maxQty\": 0,\n" \
            "        \"minQty\": 0,\n" \
            "        \"name\": \"Pizzas\",\n" \
            "        \"sortingPosition\": 1\n" \
            "      },\n" \
            "      \"children\": [],\n" \
            "      \"name\": \"Hawaiian Pizza\",\n" \
            "      \"price\": 17000,\n" \
            "      \"sku\": \"2135092145\",\n" \
            "      \"sortingPosition\": 1,\n" \
            "      \"type\": \"PRODUCT\"\n" \
            "    }\n" \
            "  ]\n" \
            "}\n"
headers = {
    'Content-Type': 'application/json',
    'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu"
    method := "POST"

    payload := strings.NewReader("{\n" +
        "  \"storeId\": \"900103361\",\n" +
        "  \"items\": [\n" +
        "    {\n" +
        "      \"category\": {\n" +
        "        \"id\": \"2090019638\",\n" +
        "        \"maxQty\": 0,\n" +
        "        \"minQty\": 0,\n" +
        "        \"name\": \"Burgers\",\n" +
        "        \"sortingPosition\": 0\n" +
        "      },\n" +
        "      \"children\": [\n" +
        "        {\n" +
        "          \"category\": {\n" +
        "            \"id\": \"211\",\n" +
        "            \"maxQty\": 1,\n" +
        "            \"minQty\": 0,\n" +
        "            \"name\": \"Do you want to add?\",\n" +
        "            \"sortingPosition\": 0\n" +
        "          },\n" +
        "          \"children\": [],\n" +
        "          \"name\": \"French Fries\",\n" +
        "          \"price\": 5000,\n" +
        "          \"sku\": \"2135092145\",\n" +
        "          \"sortingPosition\": 1,\n" +
        "          \"type\": \"TOPPING\",\n" +
        "          \"maxLimit\": 1\n" +
        "        },\n" +
        "        {\n" +
        "          \"category\": {\n" +
        "            \"id\": \"211\",\n" +
        "            \"maxQty\": 1,\n" +
        "            \"minQty\": 0,\n" +
        "            \"name\": \"Do you want to add?\",\n" +
        "            \"sortingPosition\": 0\n" +
        "          },\n" +
        "          \"children\": [],\n" +
        "          \"name\": \"Potato Wedges\",\n" +
        "          \"price\": 7000,\n" +
        "          \"sku\": \"2135092145\",\n" +
        "          \"sortingPosition\": 1,\n" +
        "          \"type\": \"TOPPING\",\n" +
        "          \"maxLimit\": 1\n" +
        "        }\n" +
        "      ],\n" +
        "      \"name\": \"Grilled Chicken Burger\",\n" +
        "      \"price\": 14000,\n" +
        "      \"sku\": \"2135092145\",\n" +
        "      \"sortingPosition\": 0,\n" +
        "      \"type\": \"PRODUCT\"\n" +
        "    },\n" +
        "    {\n" +
        "      \"category\": {\n" +
        "        \"id\": \"2090019639\",\n" +
        "        \"maxQty\": 0,\n" +
        "        \"minQty\": 0,\n" +
        "        \"name\": \"Pizzas\",\n" +
        "        \"sortingPosition\": 1\n" +
        "      },\n" +
        "      \"children\": [],\n" +
        "      \"name\": \"Hawaiian Pizza\",\n" +
        "      \"price\": 17000,\n" +
        "      \"sku\": \"2135092145\",\n" +
        "      \"sortingPosition\": 1,\n" +
        "      \"type\": \"PRODUCT\"\n" +
        "    }\n" +
        "  ]\n" +
        "}\n")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
storeId
string
required Identifier of the store in the Rappi application.
items
array of objects
required Product list
items.name
string
required Name of the product in the menu
items.description
string
required Description of the product in the menu
items.sku
string
required SKU that the ally assigned for the product in the menu
items.type
string
required Item type. In this case can be only PRODUCT
items.price
integer
required Price of the product in the menu
items.imageUrl
string
optional Image url of the product in the menu
items.availableFrom
string
optional Start date from the product is available to sell in the menu
items.availableTo
string
optional End date from the product is available to sell in the menu
items.rappiIds
array of string
optional List of the identifiers Rappi gives to this item
items.sortingPosition
integer
optional The position of the product in its category
items.maxLimit
integer
optional Maximum indicator of the item, it's required only if the type is topping
items.category
string
required Category of the product in the menu
items.category.id
string
required The SKU (Stock-Keeping Unit) the ally gives to this category
items.category.name
string
required Category name
items.category.minQty
integer
required The maximum number of items that can be ordered in this category
items.category.maxQty
integer
required The minimum quantity of elements that can be ordered in this category (In toppings, if it's 0 it means that it's not mandatory)
items.category.sortingPosition
integer
required it's the position of the category in the menu
items.children
array of objects
optional List of product's toppings from the menu
items.children.name
string
required Name of the topping in the menu
items.children.description
string
required Description of the topping in the menu
items.children.sku
string
required SKU that the ally assigned for the topping in the menu
items.children.type
string
required Item type. In this case can be only TOPPING
items.children.price
integer
required Price of the topping in the menu
items.children.imageUrl
string
optional Image url of the topping in the menu
items.children.availableFrom
string
optional Start date from the topping is available to sell in the menu
items.children.availableTo
string
optional End date from the topping is available to sell in the menu
items.children.rappiIds
array of string
optional List of the identifiers Rappi gives to this item
items.children.sortingPosition
integer
optional The position of the topping in its category
items.children.maxLimit
integer
optional Maximum indicator of the item, it's required only if the type is topping
items.children.category
string
required Category of the topping in the menu
items.children.category.id
string
required The SKU (Stock-Keeping Unit) the ally gives to this category
items.children.category.name
string
required Category name
items.children.category.minQty
integer
required The maximum number of items that can be ordered in this category
items.children.category.maxQty
integer
required The minimum quantity of elements that can be ordered in this category (In toppings, if it's 0 it means that it's not mandatory)
items.children.category.sortingPosition
integer
required The position of the category within the product

Sample response "200 success"

This endpoint returns only one successful response code.

Sample response "400 The menu structure is invalid"

400 The menu structure is invalid:

{
 "message": "The submitted menu has errors.",
 "errors": [
  {
   "reason": "All items must have a valid name, category or product description.",
   "relatedItems": [
    {
     "description": "",
     "sku": "product1",
     "type": "PRODUCT",
     "price": 899.0,
     "category": {
      "id": "455",
      "name": "producto category name 1",
      "minQty": 0,
      "maxQty": 0,
      "sortingPosition": 0
     },
     "imageUrl": "https://anydomain/anyimagen_1.png",
     "availableFrom": null,
     "availableTo": null,
     "rappiIds": [
      "1965855"
     ],
     "sortingPosition": 0,
     "maxLimit": 1
    }
   ]
  },
  {
   "reason": "Invalid urls were found",
   "relatedItems": [
    {
     "name": "producto name 1",
     "description": "",
     "sku": "product2",
     "type": "PRODUCT",
     "price": 899.0,
     "category": {
      "id": "455",
      "name": "producto category name 1",
      "minQty": 0,
      "maxQty": 0,
      "sortingPosition": 0
     },
     "imageUrl": "httpaas://anydomain/anyimagen_2.png",
     "availableFrom": null,
     "availableTo": null,
     "rappiIds": [
      "1965855"
     ],
     "sortingPosition": 0,
     "maxLimit": 1
    }
   ]
  }
 ]
}

This table describes the attributes from JSON response:

Attributes Description
message
string
Generic error message to response "structure is invalid." message: "The submitted menu has errors."
errors
array of objects
Error list found in menu.
errors.reason
string
Description of the error. you can find more info in "Validations on the Received menu"
errors.relatedItems
array of objects
Items with error.

You can see the list of structure validations in the VALIDATIONS ON THE RECEIVED MENU.

Sample response "401 Invalid Credentials"

401 Invalid Credentials:

{
    "message": "Not a valid token"
}

This table describes the attributes from JSON response:

Attributes Description
message
string
Not a valid token

Sample response "404 Store not found"

404 Store not found:

{
    "message": "StoreId 9001035324: not found associated Stores"
}

This table describes the attributes from JSON response:

Attributes Description
message
string
Store not found

GET menu/approved/{storeId}

Use this endpoint to return the approval status of a menu.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/menu/approved/{storeId}

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

This table contains the possible response codes for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu/approved/251

This is an example of the request:

final Integer storeId = 251;

URL url = new URL(
        String.format("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu/approved/%s", storeId));

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
        new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
    StringBuilder response = new StringBuilder();
    String responseLine;
    while ((responseLine = br.readLine()) != null) {
        response.append(responseLine.trim());
    }
    System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/menu/approved/251',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu/approved/251"

payload = {}
headers = {
    'Content-Type': 'application/json',
    'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu/approved/251"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This endpoint returns a status response code only.

401 Invalid Credentials:

{
    "message": "Not a valid token"
}

GET menu/rappi/{storeId}

Use this endpoint to return the last menu created for a specific store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/menu/rappi/{storeId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

This table contains the possible response codes for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu/rappi/251

This is an example of the request:

final Integer storeId = 251;

URL url = new URL(
        String.format("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu/rappi/%s", storeId));

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
        new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
    StringBuilder response = new StringBuilder();
    String responseLine;
    while ((responseLine = br.readLine()) != null) {
        response.append(responseLine.trim());
    }
    System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/menu/rappi/251',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu/rappi/251"

payload = {}
headers = {
    'Content-Type': 'application/json',
    'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/menu/rappi/251"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response "Success 200":

{
    "storeId": "900111978",
    "items": [
        {
            "name": "Naked Cake con frutos",
            "description": "Naked cake decorado con frutos. Cubierta de trufa derretida (ganache) y decorada con frutos del bosque.",
            "sku": "8569874",
            "type": "PRODUCT",
            "price": 75.0,
            "category": {
                "id": "3",
                "name": "Tortas",
                "minQty": 0,
                "maxQty": 0,
                "sortingPosition": 0
            },
            "imageUrl": "https://image.com/image1.jpg",
            "children": [
                {
                    "name": "Chocolate",
                    "description": "",
                    "sku": "8569874-159",
                    "type": "TOPPING",
                    "price": 0.0,
                    "category": {
                        "id": "1",
                        "name": "Sabor",
                        "minQty": 0,
                        "maxQty": 1,
                        "sortingPosition": 0
                    },
                    "imageUrl": "https://image.com/image10.jpg",
                    "children": [],
                    "availableFrom": null,
                    "availableTo": null,
                    "rappiIds": [
                        "340948822"
                    ],
                    "sortingPosition": 1,
                    "maxLimit": 1
                }
            ],
            "availableFrom": null,
            "availableTo": null,
            "rappiIds": [
                "2135527868"
            ],
            "sortingPosition": 0,
            "maxLimit": 1
        },
        {
            "name": "Snowman",
            "description": "Linda lata de Snowman con productos variadosIncluye:Galletas mantequilla 350 gr, 6 brookies y 4 trufas de brownie.",
            "sku": "856887",
            "type": "PRODUCT",
            "price": 75.0,
            "category": {
                "id": "9",
                "name": "Navidad",
                "minQty": 0,
                "maxQty": 0,
                "sortingPosition": 0
            },
            "imageUrl": "https://image.com/image2.jpg",
            "children": [],
            "availableFrom": null,
            "availableTo": null,
            "rappiIds": [
                "2135524472"
            ],
            "sortingPosition": 0,
            "maxLimit": 1
        }
    ]
}

This is an example of the response "Invalid credentials 401":

{
    "message": "Not a valid token"
}

The context of the attribute response were mentionend before in Get Menu.

Orders

The Orders resource enables you to interact with the orders of your stores.

The following table describes the different contents of the Orders resource:

Resource Description
GET orders Returns a list of new orders created.
GET orders/status/sent Returns a list of new orders created in SENT.
PUT orders/{orderId}/take/{cookingTime} Takes an order to commence preparation.
PUT orders/{orderId}/reject Rejects an order.
POST orders/{orderId}/ready-for-pickup Confirms that the order is ready for pickup.
GET orders/{orderId}/events Returns the latest events from the orders.

GET orders

Use this endpoint to return a collection of all the new orders for the stores of the authenticating ally.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/orders

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint admits the following optional additional parameters:

Parameter Description
{storeId} Returns only the orders from a specific store

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders

this is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/orders',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

[
   {
      "order_detail":{
         "order_id":"392625",
         "cooking_time":10,
         "min_cooking_time":5,
         "max_cooking_time":20,
         "created_at":"2019-04-10T11:12:57.000Z",
         "delivery_method":"delivery",
         "payment_method":"cc",
        "delivery_information": {
          "city": "Ciudad de México",
          "complete_address": "Nombre de la calle 5050. Barrio. 12345. Ciudad De México",
          "street_number": "5050",
          "neighborhood": "Barrio",
          "complement": "Portón verde",
          "postal_code": "12345",
          "street_name": "Nombre de la calle"
        },
         "billing_information":{
            "address":"148  Davis Court",
            "billing_type":"Bill",
            "document_number":"32432342",
            "document_type":"DNI",
            "email":"client@gmail.com",
            "name":"John Doe",
            "phone":"43333222"
         },
         "totals":{
            "total_products_with_discount":204000,
            "total_products_without_discount":173685,
            "total_other_discounts":0,
            "total_order":204180,
            "total_to_pay":0,
            "charges":{
               "shipping":50,
               "service_fee":100
            },
            "other_totals":{
               "tip":30,
               "total_rappi_pay":0,
               "total_rappi_credits":0
            }
         },
         "items":[
            {
               "sku":"1234",
               "id":"2089918083",
               "name":"Chicken and Apple Salad",
               "type":"PRODUCT",
               "comments":"No vinegar",
               "unit_price_with_discount":18785,
               "unit_price_without_discount":28900,
               "percentage_discount":35,
               "quantity":3,
               "subitems":[
                  {
                     "sku":"11",
                     "id":"10005260",
                     "name":"Burrata Cheese",
                     "type":"TOPPING",
                     "unit_price_without_discount":13500,
                     "unit_price_with_discount":13500,
                     "percentage_discount":0,
                     "quantity":1
                  }
               ]
            },
            {
               "id":"2089918082",
               "name":"Seafood Salad",
               "comments":"",
               "unit_price_with_discount":34900,
               "unit_price_without_discount":34900,
               "percentage_discount":0,
               "quantity":2,
               "subitems":[
                  {
                     "id":"9928277",
                     "name":"With white vinaigrette",
                     "unit_price_without_discount":0,
                     "unit_price_with_discount":0,
                     "percentage_discount":0,
                     "quantity":1
                  },
                  {
                     "id":"10005257",
                     "name":"Ricotta Cheese",
                     "unit_price_without_discount":3500,
                     "unit_price_with_discount":3500,
                     "percentage_discount":0,
                     "quantity":1
                  }
               ]
            }
         ],
         "delivery_discount":{
            "total_percentage_discount":100,
            "total_value_discount":50
         }
      },
      "customer":{
         "first_name":"John",
         "last_name":"Doe",
         "phone_number":"3163535",
         "document_number":"34545678",
         "user_type":"USER_VIP"
      },
      "store":{
         "internal_id":"30000011",
         "external_id":"123445",
         "name":"Store 1"
      }
   }
]

This table describes the objects contained in the response example:

Response Object Object Description
order_detail
array of objects
Properties of the details of the order.
order_detail.object_id
string
Identifier for the order.
order_detail.coooking_time
integer
Cooking time estimated for the preparation of the order.
order_detail.min_cooking_time
integer
Minimum cooking time in minutes set for this order.
order_detail.max_cooking_time
integer
Maximum cooking time in minutes set for this order.
order_detail.created_at
string
Creation date of the order.
order_detail.delivery_method
string, enumerable
Delivery method set for this order. Options available: delivery,marketplace, pickup.
order_detail.payment_method
string, enumerable
Payment method set for this order. Options available: rappi_pay, cc, cash, paypal, edenred, webpay, masterpass, dc, pos_terminal, elo, sodexo, vale_r, ticket_r, alelo, visa_checkout,google_pay, apple_pay, rappicorp, PSE, PIX, unknown.
order_detail.delivery_information
object
Properties of the delivery information.
order_detail.delivery_information.city
string
City of the delivery address.
order_detail.delivery_information.complete_address
string
Delivery address with all the fields
order_detail.delivery_information.street_number
string
Number of the street.
order_detail.delivery_information.neighborhood
string
Neighborhood of the address.
order_detail.delivery_information.complement
string
Additional information of the address.
order_detail.delivery_information.postal_code
string
Postal code of the address
order_detail.delivery_information.street_name
string
Street name of the address.
order_detail.billing_information
array of objects
Properties of the billing information.
order_detail.billing_information.address
string
Delivery address set for this order.
order_detail.billing_information.billing_type
string
Billing type set for this order.
order_detail.billing_information.document_number
string
Document number of the customer.
order_detail.billing_information.document_type
string
Document type of the customer.
order_detail.billing_information.email
string
Email set to receive billing information.
order_detail.billing_information.name
string
Name set for the billing information.
order_detail.billing_information.phone
string
Phone number set for the billing information.
order_detail.totals
array of objects
Properties of the totals of the order.
order_detail.totals.total_products_with_discount
integer
Total of the products with discounts applied in the order.
order_detail.totals.total_products_without_discount
integer
Total of the products without discounts in the order.
order_detail.totals.total_other_discounts
integer
Order global discounts (not applied to individual products).
order_detail.totals.total_order
integer
The total amount that the restaurant receives.
When the delivery method is marketplace this field includes tip and delivery fee.
For other delivery methods, this field contains only the total value of all products.
In all cases, this field includes the discounts assumed by the restaurant.
order_detail.totals.total_to_pay
integer
Total that the user pays in cash to the courier. Only applies when the delivery method is marketplace or pickup, and the payment method is cash.
order_detail.totals.charges
array of objects
Properties of the order additional charges.
order_detail.totals.charges.shipping
integer
Shipping charges total.
order_detail.totals.charges.service_fee
integer
Rappi service fee charges
order_detail.totals.other_totals
array of objects
Other charges included in this order.
order_detail.totals.other_totals.tip
integer
Tip for the courier.
order_detail.totals.other_totals.total_rappi_pay
integer
Total paid using Rappi Pay.
order_detail.totals.othet_totals.total_rappi_credits
integer
Total paid using Rappi Credits.
order_detail.items
array of objects
Properties of the items the order contains.
order_detail.items.sku
string
SKU for the item in the order. The ally grants their own SKU to the item.
order_detail.items.id
string
Identifier of the item in the order.
order_detail.items.name
string
Name of the item in the order.
order_detail.items.type
string, enumerable
Type of the item. Options available:
product, or topping.
order_detail.items.comments
array
User comments for the items in the order.
order_detail.items.unit_price_with_discount
integer
Unit price for the item with the discount applied.
order_detail.items.unit_price_without_discount
integer
Unit price for the item without the discount.
order_detail.items.percentage_discount
integer
Discount percentage of the item in the order.
order_detail.items.quantity
integer
Quantity specified for this item in the order.
order_detail.items.subitems
array of objects
Properties of subitems in the order.
order_detail.items.subitems.sku
string
SKU for the subitem in the menu. The ally grants their own SKU to the item.
order_detail.items.subitems.id
string
The identifier that Rappi grants the item.
order_detail.items.subitems.name
string
Name of the subitem in the order.
order_detail.items.subitems.type
string, enumerable
Type of the subitem in the order. Options available: product, or topping.
order_detail.items.subitems.unit_price_without_discount
integer
Unit price for the subitem without the discount.
order_detail.items.subitems.unit_price_with_discount
integer
Unit price for the subitem with the discount applied.
order_detail.items.subitems.pencentage_discount
integer
Discount percentage of the subitem in the order.
order_detail.items.subitems.quantity
integer
Quantity specified for this subitem in the order.
order_detail.items.delivery_discount
integer
Properties of the discounts in the delivery of the order.
order_detail.items.delivery_discount.total_percentage_discount
integer
Discount percentage in the delivery of the order.
order_detail.items.delivery_discount.total_value_discount
integer
Total amount of the delivery discount.
order_detail.customer
array of objects
Properties of the Rappi user that places the order. Only sent when delivery method is marketplace or if you request Rappi to receive this data.
order_detail.customer.first_name
string
First name of the Rappi user that places the order.
order_detail.customer.last_name
string
Last name of the Rappi user that places the order.
order_detail.customer.phone_number
string
Phone number of the Rappi user that places the order.
order_detail.customer.document_number
string
Document number of the Rappi user that places the order.
order_detail.customer.user_type
string
If the user is VIP the value is USER_VIP. For other users this field is not sent.
order_detail.store
array of objects
Properties of the store that prepares the order.
order_detail.store.internal_id
string
Internal identifier that Rappi grants the store.
order_detail.store.external_id
string
Integration identifier of the store.
order_detail.store.name
string
Name of the store that prepares the order.

GET orders status SENT

Use this endpoint to return a collection of all the new orders status SENT for the stores of the authenticating ally.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/orders/status/sent

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint admits the following optional additional parameters:

Parameter Description
{storeId} Returns only the orders from a specific store

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/status/sent

this is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/status/sent");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/orders/status/sent',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/status/sent"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/status/sent"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

[
   {
      "order_detail":{
         "order_id":"392625",
         "cooking_time":10,
         "min_cooking_time":5,
         "max_cooking_time":20,
         "created_at":"2019-04-10T11:12:57.000Z",
         "delivery_method":"delivery",
         "payment_method":"cc",
        "delivery_information": {
          "city": "Ciudad de México",
          "complete_address": "Nombre de la calle 5050. Barrio. 12345. Ciudad De México",
          "street_number": "5050",
          "neighborhood": "Barrio",
          "complement": "Portón verde",
          "postal_code": "12345",
          "street_name": "Nombre de la calle"
        },
         "billing_information":{
            "address":"148  Davis Court",
            "billing_type":"Bill",
            "document_number":"32432342",
            "document_type":"DNI",
            "email":"client@gmail.com",
            "name":"John Doe",
            "phone":"43333222"
         },
         "totals":{
            "total_products_with_discount":204000,
            "total_products_without_discount":173685,
            "total_other_discounts":0,
            "total_order":204180,
            "total_to_pay":0,
            "charges":{
               "shipping":50,
               "service_fee":100
            },
            "other_totals":{
               "tip":30,
               "total_rappi_pay":0,
               "total_rappi_credits":0
            }
         },
         "items":[
            {
               "sku":"1234",
               "id":"2089918083",
               "name":"Chicken and Apple Salad",
               "type":"PRODUCT",
               "comments":"No vinegar",
               "unit_price_with_discount":18785,
               "unit_price_without_discount":28900,
               "percentage_discount":35,
               "quantity":3,
               "subitems":[
                  {
                     "sku":"11",
                     "id":"10005260",
                     "name":"Burrata Cheese",
                     "type":"TOPPING",
                     "unit_price_without_discount":13500,
                     "unit_price_with_discount":13500,
                     "percentage_discount":0,
                     "quantity":1
                  }
               ]
            },
            {
               "id":"2089918082",
               "name":"Seafood Salad",
               "comments":"",
               "unit_price_with_discount":34900,
               "unit_price_without_discount":34900,
               "percentage_discount":0,
               "quantity":2,
               "subitems":[
                  {
                     "id":"9928277",
                     "name":"With white vinaigrette",
                     "unit_price_without_discount":0,
                     "unit_price_with_discount":0,
                     "percentage_discount":0,
                     "quantity":1
                  },
                  {
                     "id":"10005257",
                     "name":"Ricotta Cheese",
                     "unit_price_without_discount":3500,
                     "unit_price_with_discount":3500,
                     "percentage_discount":0,
                     "quantity":1
                  }
               ]
            }
         ],
         "delivery_discount":{
            "total_percentage_discount":100,
            "total_value_discount":50
         }
      },
      "customer":{
         "first_name":"John",
         "last_name":"Doe",
         "phone_number":"3163535",
         "document_number":"34545678",
         "user_type":"USER_VIP"
      },
      "store":{
         "internal_id":"30000011",
         "external_id":"123445",
         "name":"Store 1"
      }
   }
]

This table describes the objects contained in the response example:

Response Object Object Description
order_detail
array of objects
Properties of the details of the order.
order_detail.object_id
string
Identifier for the order.
order_detail.coooking_time
integer
Cooking time estimated for the preparation of the order.
order_detail.min_cooking_time
integer
Minimum cooking time in minutes set for this order.
order_detail.max_cooking_time
integer
Maximum cooking time in minutes set for this order.
order_detail.created_at
string
Creation date of the order.
order_detail.delivery_method
string, enumerable
Delivery method set for this order. Options available: delivery,marketplace, pickup.
order_detail.payment_method
string, enumerable
Payment method set for this order. Options available: rappi_pay, cc, cash, paypal, edenred, webpay, masterpass, dc, pos_terminal, elo, sodexo, vale_r, ticket_r, alelo, visa_checkout,google_pay, apple_pay, rappicorp, unknown.
order_detail.delivery_information
object
Properties of the delivery information.
order_detail.delivery_information.city
string
City of the delivery address.
order_detail.delivery_information.complete_address
string
Delivery address with all the fields
order_detail.delivery_information.street_number
string
Number of the street.
order_detail.delivery_information.neighborhood
string
Neighborhood of the address.
order_detail.delivery_information.complement
string
Additional information of the address.
order_detail.delivery_information.postal_code
string
Postal code of the address
order_detail.delivery_information.street_name
string
Street name of the address.
order_detail.billing_information
array of objects
Properties of the billing information.
order_detail.billing_information.address
string
Delivery address set for this order.
order_detail.billing_information.billing_type
string
Billing type set for this order.
order_detail.billing_information.document_number
string
Document number of the customer.
order_detail.billing_information.document_type
string
Document type of the customer.
order_detail.billing_information.email
string
Email set to receive billing information.
order_detail.billing_information.name
string
Name set for the billing information.
order_detail.billing_information.phone
string
Phone number set for the billing information.
order_detail.totals
array of objects
Properties of the totals of the order.
order_detail.totals.total_products_with_discount
integer
Total of the products with discounts applied in the order.
order_detail.totals.total_products_without_discount
integer
Total of the products without discounts in the order.
order_detail.totals.total_other_discounts
integer
Order global discounts (not applied to individual products).
order_detail.totals.total_order
integer
The total amount that the restaurant receives.
When the delivery method is marketplace this field includes tip and delivery fee.
For other delivery methods, this field contains only the total value of all products.
In all cases, this field includes the discounts assumed by the restaurant.
order_detail.totals.total_to_pay
integer
Total that the user pays in cash to the courier. Only applies when the delivery method is marketplace or pickup, and the payment method is cash.
order_detail.totals.charges
array of objects
Properties of the order additional charges.
order_detail.totals.charges.shipping
integer
Shipping charges total.
order_detail.totals.charges.service_fee
integer
Rappi service fee charges
order_detail.totals.other_totals
array of objects
Other charges included in this order.
order_detail.totals.other_totals.tip
integer
Tip for the courier.
order_detail.totals.other_totals.total_rappi_pay
integer
Total paid using Rappi Pay.
order_detail.totals.othet_totals.total_rappi_credits
integer
Total paid using Rappi Credits.
order_detail.items
array of objects
Properties of the items the order contains.
order_detail.items.sku
string
SKU for the item in the order. The ally grants their own SKU to the item.
order_detail.items.id
string
Identifier of the item in the order.
order_detail.items.name
string
Name of the item in the order.
order_detail.items.type
string, enumerable
Type of the item. Options available:
product, or topping.
order_detail.items.comments
array
User comments for the items in the order.
order_detail.items.unit_price_with_discount
integer
Unit price for the item with the discount applied.
order_detail.items.unit_price_without_discount
integer
Unit price for the item without the discount.
order_detail.items.percentage_discount
integer
Discount percentage of the item in the order.
order_detail.items.quantity
integer
Quantity specified for this item in the order.
order_detail.items.subitems
array of objects
Properties of subitems in the order.
order_detail.items.subitems.sku
string
SKU for the subitem in the menu. The ally grants their own SKU to the item.
order_detail.items.subitems.id
string
The identifier that Rappi grants the item.
order_detail.items.subitems.name
string
Name of the subitem in the order.
order_detail.items.subitems.type
string, enumerable
Type of the subitem in the order. Options available: product, or topping.
order_detail.items.subitems.unit_price_without_discount
integer
Unit price for the subitem without the discount.
order_detail.items.subitems.unit_price_with_discount
integer
Unit price for the subitem with the discount applied.
order_detail.items.subitems.pencentage_discount
integer
Discount percentage of the subitem in the order.
order_detail.items.subitems.quantity
integer
Quantity specified for this subitem in the order.
order_detail.items.delivery_discount
integer
Properties of the discounts in the delivery of the order.
order_detail.items.delivery_discount.total_percentage_discount
integer
Discount percentage in the delivery of the order.
order_detail.items.delivery_discount.total_value_discount
integer
Total amount of the delivery discount.
order_detail.customer
array of objects
Properties of the Rappi user that places the order. Only sent when delivery method is marketplace or if you request Rappi to receive this data.
order_detail.customer.first_name
string
First name of the Rappi user that places the order.
order_detail.customer.last_name
string
Last name of the Rappi user that places the order.
order_detail.customer.phone_number
string
Phone number of the Rappi user that places the order.
order_detail.customer.document_number
string
Document number of the Rappi user that places the order.
order_detail.customer.user_type
string
If the user is VIP the value is USER_VIP. For other users this field is not sent.
order_detail.store
array of objects
Properties of the store that prepares the order.
order_detail.store.internal_id
string
Internal identifier that Rappi grants the store.
order_detail.store.external_id
string
Integration identifier of the store.
order_detail.store.name
string
Name of the store that prepares the order.

PUT orders/{orderId}/take/{cookingTime}

Use this endpoint to take an order, so the store commences preparing it.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/orders/{orderId}/take/{cookingTime}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/take/20

this is an example of the request:

final Integer orderId = 392625;
final Integer cookingTime = 20;

URL url = new URL(
         String.format("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/%s/take/%s", orderId, cookingTime)
);

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/orders/392625/take/20',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/take/20"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/take/20"
    method := "PUT"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This endpoint returns a status response code only.

PUT orders/{orderId}/reject

Use this endpoint to reject an order.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/orders/{orderId}/reject

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

Name Requirement Description
orderId
string
required Rejects a specific order.
items_ids
array of string
optional List of offending items ids. Here you should use the rappi ids
items_skus
array of string
optional List of offending items skus. Here you should use your skus
cancel_type
string
enumerable
optional Enum: "ITEM_WRONG_PRICE", "ITEM_NOT_FOUND", "ITEM_OUT_OF_STOCK", "ORDER_MISSING_INFORMATION", "ORDER_MISSING_ADDRESS_INFORMATION", "ORDER_TOTAL_INCORRECT"

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/reject

This is an example of the request:

{
   "reason":"The order has invalid items"
}

This is an example of the request with offending items:

 {
    "reason":"The order has invalid items",
    "cancel_type": "ITEM_NOT_FOUND",
    "items_skus": ["sku1", "sku2"]
 }
final Integer orderId = 3320025;

URL url = new URL(
         String.format("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/%s/reject", orderId)
);

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\"reason\":\"The order has invalid items\"}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/orders/392625/reject',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
    'maxRedirects': 20
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({"reason":"The order has invalid items"});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/reject"

payload = "{\"reason\":\"The order has invalid items\"}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/reject"
    method := "PUT"

    payload := strings.NewReader("{\"reason\":\"The order has invalid items\"}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
reason
string
required Reason to reject the order

Sample Response

This endpoint returns a status response code only.

POST orders/{orderId}/ready-for-pickup

Use this endpoint to notify the user in the Rappi application that the order is ready for pickup.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/orders/{orderId}/ready-for-pickup

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/ready-for-pickup

This is an example of the request:

final Integer orderId = 392625;

URL url = new URL(
         String.format(
               "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/%s/ready-for-pickup",
               orderId));

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'POST',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/orders/392625/ready-for-pickup',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/ready-for-pickup"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/ready-for-pickup"
    method := "POST"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This endpoint returns a status response code only.

GET orders/{orderId}/events

Use this endpoint to retrieve the latest status updates from your orders.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/orders/{orderId}/events

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/events

This is an example of the request:

final Integer orderId = 392625;

URL url = new URL(
         String.format(
               "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/%s/events",
               orderId));

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/orders/392625/events',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/events"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/orders/392625/events"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Response

This is an example of the response:

[
   {
      "event":"canceled_with_charge",
      "event_time":"2020-05-28T12:31:12.501Z",
      "additional_information":{

      }
   },
   {
      "event":"taken_visible_order",
      "event_time":"2020-05-28T12:30:12.501Z",
      "additional_information":{
         "eta_to_store":"15"
      }
   }
]

This table describes the objects contained in the response example:

Response Object Object Description
event
string
Latest order event.
event_time
string
Time of the event. Format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
additional_information
array of objects
Additional information for the order. The format can vary depending on the event.
additional_information.eta_to_store
string
Courier estimated time of arrival to the store.

Stores

The Stores resource enables you to interact with your stores.

The following table describes the different contents of the Stores resource:

API Resource Endpoint Endpoint Description
GET stores-pa Returns the list of stores for the authenticated client
PUT stores-pa/{storeId}/status Update a store to integrated or not integrated

GET stores-pa

Use this endpoint to retrieve the stores of an authenticating ally.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/stores-pa

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/stores-pa

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/stores");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/stores-pa',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/stores-pa"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/stores-pa"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response "Success 200"

This is an example of the response "Success 200":

[
   {
      "integrationId":"111",
      "rappiId":"890982",
      "name":"Store 1"
   },
   {
      "integrationId":"222",
      "rappiId":"890983",
      "name":"Store 2"
   },
   {
      "integrationId":"333",
      "rappiId":"890983",
      "name":"Store 3"
   }
]

This table describes the objects contained in the response example:

Object Description
integrationId
string
Identifier of the store in the Rappi application
rappiId
string
Identifier that Rappi granted the ally
name
string
Name of the store in the Rappi application

Sample Response "Invalid credentials 401"

This is an example of the response "Invalid credentials 401":

{
 "message": "Not a valid token"
}

This table describes the objects contained in the response example:

Object Description
message
string
Descriptive error message

Sample Response "App Client no encontrado 404"

This is an example of the response "App Client no encontrado 404":

{
 "message": "Not found appClient of client id {clientId}"
}

This table describes the objects contained in the response example:

Object Description
message
string
Descriptive error message

PUT store-pa integrated status

Use this endpoint to change a store to integrated or to not integrated

URL del Endpoint

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/stores-pa/{storeId}/status

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint has the following parameters:

Parameter Description
{storeId} Path Param. Store Id from rappi
{integrated} Query Param. To indicate whether the store is changed to "integrated" (true) o "not integrated" (false)

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/stores-pa/12345/status?integrated=true

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/stores-pa/12345/status?integrated=true");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/stores-pa/12345/status?integrated=true',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/stores-pa/12345/status?integrated=true"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/stores-pa/12345/status?integrated=true"
    method := "PUT"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response "Success 200"

This is an example of the response "Success 200" when updating a store to "integrated"

{
  "message":"The store {storeid} was changed to integrated {true} successfully."
}

This is an example of the response "Success 200" when updating a store to "not integrated"

{
  "message":"The store {storeid} was changed to integrated {false} successfully. Please remember to login into the partners app and set the AUTO ACCEPT config"
}

This table describes the objects contained in the response example:

Objeto Descripción
message
string
Mensaje con la información del cambio realizado

Sample Response "Invalid credentials 401"

This is an example of the response "Invalid credentials 401":

{
 "message": "Not a valid token"
}

This table describes the objects contained in the response example:

Object Description
message
string
Descriptive error message

Sample Response "App Client no encontrado 404"

This is an example of the response "App Client no encontrado 404":

{
 "message": "Not found appClient of client id {clientId}"
}

This table describes the objects contained in the response example:

Object Description
message
string
Descriptive error message

Sample Response "Error while updating the store 400"

This is an example of the response "Error while updating the store 400":

{
  "message": "There was an error trying to change the store {storeId} to integrated: {true|false}. Please contact support team"
}

This table describes the objects contained in the response example:

Object Description
message
string
Descriptive error message

Availability

The Availability resource enables you to interact with the availability options of your items and stores.

The following table describes the different contents of the Availability resource:

Resource Description
PUT availability/stores/items Manage item availability in the application by Item SKU
PUT availability/stores/items/rappi Manage item availability in the application by Item ID
PUT availability/stores Manage store availability asynchronously in the application
PUT availability/stores/enable/massive Manage store availability asynchronously in the application
PUT availability/stores/enable Manage store availability synchronously in the application

PUT availability/stores/items

Use this endpoint to configure the availability options of your items by SKU in your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores/items

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items

This is an example of the request:

[
   {
      "store_integration_id":"999",
      "items":{
         "turn_on":[
            "1111",
            "2222",
            "3333"
         ],
         "turn_off":[
            "5555"
         ]
      }
   }
]
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "[\n" +
         "   {\n" +
         "      \"store_integration_id\":\"999\",\n" +
         "      \"items\":{\n" +
         "         \"turn_on\":[\n" +
         "            \"1111\",\n" +
         "            \"2222\",\n" +
         "            \"3333\"\n" +
         "         ],\n" +
         "         \"turn_off\":[\n" +
         "            \"5555\"\n" +
         "         ]\n" +
         "      }\n" +
         "   }\n" +
         "]";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/availability/stores/items',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify(
    [
            {
                "store_integration_id":"999",
                "items": {
                    "turn_on": [
                        "1111",
                        "2222",
                        "3333"
                    ],
                    "turn_off": [
                        "5555"
                    ]
                }
            }
            ]);

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items"

payload = "[\n" \
         "   {\n" \
         "      \"store_integration_id\":\"999\",\n" \
         "      \"items\":{\n" \
         "         \"turn_on\":[ " \
         "            \"1111\", " \
         "            \"2222\", " \
         "            \"3333\" " \
         "         ],\n" \
         "         \"turn_off\":[ " \
         "            \"5555\" " \
         "         ]\n" \
         "      }\n" \
         "   }\n" \
         "]"

headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items"
    method := "PUT"

    payload := strings.NewReader("[\n" +
        "   {\n" +
        "      \"store_integration_id\":\"999\",\n" +
        "      \"items\":{\n" +
        "         \"turn_on\":[\n" +
        "            \"1111\",\n" +
        "            \"2222\",\n" +
        "            \"3333\"\n" +
        "         ],\n" +
        "         \"turn_off\":[\n" +
        "            \"5555\"\n" +
        "         ]\n" +
        "      }\n" +
        "   }\n" +
        "]")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
store_integration_id
string
required Identifier of the store integration.
items
array of objects
required Properties of the items you configure.
items.turn_on
string
optional SKU of the item to turn on.
items.turn_off
string
optional SKU of the item to turn off.

Sample Response

This is an example of the response with an error message:

[
   {
      "message":"Error updating items"
   }
]

These are the possible responses for the request:

PUT availability/stores/items/rappi

Use this endpoint to configure the availability options of your items by Rappi ID in your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi

This is an example of the request:

[
   {
      "store_integration_id":"999",
      "items":{
         "turn_on":[
            1111,
            2222,
            3333
         ],
         "turn_off":[
            5555
         ]
      }
   }
]
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "[\n" +
         "   {\n" +
         "      \"store_integration_id\":\"999\",\n" +
         "      \"items\":{\n" +
         "         \"turn_on\":[\n" +
         "            1111,\n" +
         "            2222,\n" +
         "            3333\n" +
         "         ],\n" +
         "         \"turn_off\":[\n" +
         "            5555\n" +
         "         ]\n" +
         "      }\n" +
         "   }\n" +
         "]";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify(
    [
            {
                "store_integration_id":"999",
                "items": {
                    "turn_on": [
                        1111,
                        2222,
                        3333
                    ],
                    "turn_off": [
                        5555
                    ]
                }
            }
            ]);

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi"

payload = "[\n" \
         "   {\n" \
         "      \"store_integration_id\":\"999\",\n" \
         "      \"items\":{\n" \
         "         \"turn_on\":[ " \
         "            1111, " \
         "            2222, " \
         "            3333 " \
         "         ],\n" \
         "         \"turn_off\":[\n" \
         "            5555\n" \
         "         ]\n" \
         "      }\n" \
         "   }\n" \
         "]"

headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))

package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/items/rappi"
    method := "PUT"

    payload := strings.NewReader("[\n" +
        "   {\n" +
        "      \"store_integration_id\":\"999\",\n" +
        "      \"items\":{\n" +
        "         \"turn_on\":[\n" +
        "            1111,\n" +
        "            2222,\n" +
        "            3333\n" +
        "         ],\n" +
        "         \"turn_off\":[\n" +
        "            5555\n" +
        "         ]\n" +
        "      }\n" +
        "   }\n" +
        "]")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
store_integration_id
string
required Identifier of the store integration.
items
array of objects
required Properties of the items you configure.
items.turn_on
integer
optional Rappi ID of the item to turn on.
items.turn_off
integer
optional Rappi ID the item to turn off.

Sample Response

This is an example of the response with an error message:

{
  "message": "Error message"
}

These are the possible responses for the request:

PUT availability/stores

Use this endpoint to configure the availability options of your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores

This is an example of the request:

{
   "turn_on":[
      "2222"
   ],
   "turn_off":[
      "333",
      "444"
   ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
         "   \"turn_on\":[\n" +
         "      \"2222\"\n" +
         "   ],\n" +
         "   \"turn_off\":[\n" +
         "      \"333\",\n" +
         "      \"444\"\n" +
         "   ]\n" +
         "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/availability/stores/items',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "turn_on":[
        "2222"
    ],
    "turn_off":[
        "333",
        "444"
    ]
});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores"

payload = "{\n" \
         "   \"turn_on\":[\n" \
         "      \"2222\"\n" \
         "   ],\n" \
         "   \"turn_off\":[\n" \
         "      \"333\",\n" \
         "      \"444\"\n" \
         "   ]\n" \
         "}"

headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores"
    method := "PUT"

    payload := strings.NewReader("{\n" +
        "   \"turn_on\":[\n" +
        "      \"2222\"\n" +
        "   ],\n" +
        "   \"turn_off\":[\n" +
        "      \"333\",\n" +
        "      \"444\"\n" +
        "   ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
turn_on
integer
optional List of store IDs to turn on.
turn_off
integer
optional List of store IDs to turn off.

Sample Response

This is an example of the response with an error message:

{
   "message":"Error message"
}

These are the possible responses to the request:

PUT availability/stores/enable/massive

Use this endpoint to configure the availability options of your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable/massive

This is an example of the request:

{
    "stores": [
            {
               "store_id": "12312",
               "is_enabled": true 
            },
             {
               "store_id": "12312",
               "is_enabled": false 
            }
        ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable/massive");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = = "{\n"
                     + "    \"stores\": [\n"
                     + "        {\n"
                     + "            \"store_id\": \"12312\",\n"
                     + "            \"is_enabled\": true\n"
                     + "        },\n"
                     + "        {\n"
                     + "            \"store_id\": \"12312\",\n"
                     + "            \"is_enabled\": false\n"
                     + "        }\n"
                     + "    ]\n"
                     + "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/availability/stores//enable/massive',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({"stores": [
                              {
                                  "store_id": "12312",
                                  "is_enabled": true
                              },
                              {
                                  "store_id": "12312",
                                  "is_enabled": false
                              }]});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable/massive"

payload = = "{\n"
      + "    \"stores\": [\n"
      + "        {\n"
      + "            \"store_id\": \"12312\",\n"
      + "            \"is_enabled\": true\n"
      + "        },\n"
      + "        {\n"
      + "            \"store_id\": \"12312\",\n"
      + "            \"is_enabled\": false\n"
      + "        }\n"
      + "    ]\n"
      + "}"

headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable/massive"
    method := "PUT"

    payload := strings.NewReader("{\n"
                           + "    \"stores\": [\n"
                           + "        {\n"
                           + "            \"store_id\": \"12312\",\n"
                           + "            \"is_enabled\": true\n"
                           + "        },\n"
                           + "        {\n"
                           + "            \"store_id\": \"12312\",\n"
                           + "            \"is_enabled\": false\n"
                           + "        }\n"
                           + "    ]\n"
                           + "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
stores
array of objects
required List of store's data
stores.store_id
string
required id of the store (rappi side) that will change the status
stores.is_enabled
boolean
required true to turn on the store, otherwise false

Sample Response

This is an example of the response with an error message:

{
   "message":"Error message"
}

These are the possible responses to the request:

PUT availability/stores/enable

Use this endpoint to configure the availability options of your stores synchronously

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/availability/stores/enable

{COUNTRY_DOMAIN}: This is your Rappi Country Domain. See the list of Country Domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response to this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable

This is an example of the request:

{
    "stores": [
        {
            "store_id": "12312",
            "is_enabled": true
        },
        {
            "store_id": "12312",
            "is_enabled": false
        }
    ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = = "{\n"
                     + "    \"stores\": [\n"
                     + "        {\n"
                     + "            \"store_id\": \"12312\",\n"
                     + "            \"is_enabled\": true\n"
                     + "        },\n"
                     + "        {\n"
                     + "            \"store_id\": \"12312\",\n"
                     + "            \"is_enabled\": false\n"
                     + "        }\n"
                     + "    ]\n"
                     + "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/availability/stores/enable',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({"stores": [
                              {
                                  "store_id": "12312",
                                  "is_enabled": true
                              },
                              {
                                  "store_id": "12312",
                                  "is_enabled": false
                              }]});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable"

payload = = "{\n"
      + "    \"stores\": [\n"
      + "        {\n"
      + "            \"store_id\": \"12312\",\n"
      + "            \"is_enabled\": true\n"
      + "        },\n"
      + "        {\n"
      + "            \"store_id\": \"12312\",\n"
      + "            \"is_enabled\": false\n"
      + "        }\n"
      + "    ]\n"
      + "}"

headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/availability/stores/enable"
    method := "PUT"

    payload := strings.NewReader("{\n"
                           + "    \"stores\": [\n"
                           + "        {\n"
                           + "            \"store_id\": \"12312\",\n"
                           + "            \"is_enabled\": true\n"
                           + "        },\n"
                           + "        {\n"
                           + "            \"store_id\": \"12312\",\n"
                           + "            \"is_enabled\": false\n"
                           + "        }\n"
                           + "    ]\n"
                           + "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
stores
array of objects
required List of store's data
stores.store_id
string
required id of the store (your side) that will change the status
stores.is_enabled
boolean
required true to turn on the store, otherwise false

Sample Response

This is an example of a successful response:

{
    "results":[
        {
            "store_id": 90774,
            "is_enabled": true,
            "operation_result": true,
            "operation_result_type": "SUCCESS",
            "operation_result_message": "success",
            "suspended_reason": null,
            "suspended_at": null,
            "suspended_time": 0
        },
        {
            "store_id": 90775,
            "is_enabled": false,
            "operation_result": false,
            "operation_result_type": "SUSPENDED",
            "operation_result_message": "suspended",
            "suspended_reason": "suspended due to cancelled orders",
            "suspended_at": "2022-04-11T20:23:00.00Z",
            "suspended_time": 60
        }
    ]
}

This is an example of an error response:

{
  "message": "It has been sent more than 300 stores and cannot be processed, please use the asynchronous service"
}

This table describes the attributes that the JSON of the response contains:

Response Object Object Description
results
array of objects
Result list
results.store_id
int
Store id.
results.is_enabled
boolean
Current store status
results.operation_result
boolean
true if the operation has been finished successfully, otherwise false.
results.operation_result_type
string
Possible values: SUCCESS, SUSPENDED, FORBIDDEN, STORE_NOT_PUBLISHED, STORE_ALREADY_IN_STATUS, ERROR_EXTERNAL_SERVICE
results.operation_result_message
string
Result type description
results.suspended_reason
string
If the store has been suspended, the reason will be here
results.suspended_at
date
Date since the store has been suspended
results.suspended_time
int
Time in minutes that indicates for how long the store will be suspended

Meaning of the different operation_result_type values

Webhooks

Use the webhooks resource to manage the webhooks configured in your stores.

The following table describes the different contents of the Webhooks resource:

API Resource Endpoint Endpoint Description
GET webhook/{event} Returns the webhooks configured for all the stores of the authenticated client
PUT webhook/{event}/add-stores Add stores to a specific webhook event
PUT webhook/{event}/change-url Change url from stores
POST webhook Creates a new webhook for a list of stores for the authenticated client
DELETE webhook/{event}/remove-stores Deletes stores from your webhook
PUT webhook/{event}/reset-secret Restarts the secret and generates a new one for the authenticated client
PUT webhook/{event}/change-status Enables or disables the webhooks for a list of stores

GET webhook

Use this endpoint to retrieve the webhooks configured for your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{EVENT}

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/webhook',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

Parameter Requirement Description
event
string
optional Returns only the details from a specific event

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Response

This is an example of the response:

[
    {
        "event": "event_1",
        "stores": [
            {
                "store_id": "1000",
                "url": "http://testUrl/one",
                "state": "ENABLE"
            },
            {
                "store_id": "10001",
                "url": "http://testUrl/one",
                "state": "ENABLE"
            }
        ]
    },
    {
        "event": "event_2",
        "stores": [
            {
                "store_id": "1000",
                "url": "http://testUrl/one",
                "state": "ENABLE"
            }
        ]
    }
]

This table describes the objects contained in the response example:

Response Object Object Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE

PUT webhook Add Stores

Use this endpoint to add stores to the webhook event specified.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{event}/add-stores

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

Parameter Requirement Description
event
string
required The event name to update

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/add-stores

This is an example of the request:

[
    {
       "url":"http://testDomain/webhook/data",
       "stores":[
          "1000",
          "1001"
       ]
    }
]
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/add-stores");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "[{\n" +
         "   \"url\":\"http://testDomain/webhook/data\",\n" +
         "   \"stores\":[\n" +
         "      \"1000\",\n" +
         "      \"1001\"\n" +
         "   ]\n" +
         "}]";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/add-stores',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify([{
    "url":"http://testDomain/webhook/data",
    "stores":[
        "1000",
        "1001"
    ]
}]);

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/add-stores"

payload = "[{\n" \
            "   \"url\":\"http://testDomain/webhook/data\",\n" \
            "   \"stores\":[\n" \
            "      \"1000\",\n" \
            "      \"1001\"\n" \
            "   ]\n" \
            "}]"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/add-stores"
    method := "PUT"

    payload := strings.NewReader("[{\n" +
        "   \"url\":\"http://testDomain/webhook/data\",\n" +
        "   \"stores\":[\n" +
        "      \"1000\",\n" +
        "      \"1001\"\n" +
        "   ]\n" +
        "}]")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
url
string
required URL to which the webhook communicates.
stores
array of strings
required List of the stores where the event triggers.

Sample Response

This is an example of the response:

{
   "event":"NEW_ORDER",
   "stores":[{
      "store_id":  "1000",
      "url":"http://testDomain/webhook/data",
      "state": "ENABLE"
  }]
}

This table describes the objects contained in the response example:

Response Object Object Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE

PUT webhook Change Url

Use this endpoint to update the url of the webhook event specified.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{event}/change-url

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

Parameter Requirement Description
event
string
required The event name to update

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-url

This is an example of the request:

{
  "url":"http://testDomain/webhook/data",
  "stores":[
    "1000",
    "1001"
  ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-url");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
         "   \"url\":\"http://testDomain/webhook/data\",\n" +
         "   \"stores\":[\n" +
         "      \"1000\",\n" +
         "      \"1001\"\n" +
         "   ]\n" +
         "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-url',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "url":"http://testDomain/webhook/data",
    "stores":[
        "1000",
        "1001"
    ]
});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-url"

payload = "{\n" \
            "   \"url\":\"http://testDomain/webhook/data\",\n" \
            "   \"stores\":[\n" \
            "      \"1000\",\n" \
            "      \"1001\"\n" \
            "   ]\n" \
            "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-url"
    method := "PUT"

    payload := strings.NewReader("{\n" +
        "   \"url\":\"http://testDomain/webhook/data\",\n" +
        "   \"stores\":[\n" +
        "      \"1000\",\n" +
        "      \"1001\"\n" +
        "   ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
url
string
required URL to which the webhook communicates.
stores
array of strings
required List of the stores where the event triggers.

Sample Response

This is an example of the response:

{
   "event":"NEW_ORDER",
   "stores":[{
      "store_id":  "1000",
      "url":"http://testDomain/webhook/data",
      "state": "ENABLE"
  }]
}

This table describes the objects contained in the response example:

Response Object Object Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE

POST webhook

Use this endpoint to create a webhook for your stores.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook

{COUNTRY_DOMAIN}: This is your Rappi country domain. See the list of country domains.

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook

This is an example of the request:

{
    "event": "test_event",
    "data": [
        {
            "url": "http://testDomain/webhook/data",
            "stores": [
                "1000",
                "1001"
            ]
        }
    ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
            "   \"event\":\"test_event\",\n" +
            "   \"data\": [ {" +
            "      \"url\":\"http://testDomain/webhook/data\",\n" +
            "      \"stores\":[\n" +
            "          \"1000\",\n" +
            "          \"1001\"\n" +
            "      ]\n" +
            "    } ]" +
            "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'POST',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/webhook',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "event":"test_event",
    "data": [ {
        "url":"http://testDomain/webhook/data",
        "stores":[
            "1000",
            "1001"
            ]
        }
    ]
});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook"

payload = "{\n" +
          "   \"event\":\"test_event\",\n" +
          "   \"data\": [ {" +
          "      \"url\":\"http://testDomain/webhook/data\",\n" +
          "      \"stores\":[\n" +
          "          \"1000\",\n" +
          "          \"1001\"\n" +
          "      ]\n" +
          "    } ]" +
          "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook"
    method := "POST"

    payload := strings.NewReader("{\n" +
               "   \"event\":\"test_event\",\n" +
               "   \"data\": [ {" +
               "      \"url\":\"http://testDomain/webhook/data\",\n" +
               "      \"stores\":[\n" +
               "          \"1000\",\n" +
               "          \"1001\"\n" +
               "      ]\n" +
               "    } ]" +
               "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
event
string
required Event that triggers the webhook.
url
string
required URL to which the webhook communicates.
data
array of Object
required Contains the attributes to configure
stores
array of strings
optional List of the stores where the event triggers. If you don't send this attribute, the API takes all the stores of the authenticated user.

Sample Response

This is an example of the response:

{
   "event":"test_1",
   "stores":[ {
      "url":"https://localhost:8080/test",
      "store_id": "1000",
      "state": "ENABLE"
    },
    {
      "url":"https://localhost:8080/test",
      "store_id": "1001",
      "state": "ENABLE"
    } 
   ],
   "secret":"TEST_SECRET"
}

This table describes the objects contained in the response example:

Response Object Object Description
event
string
Name of the event that triggers the webhook.
stores
array of Store
List of the stores where the event triggers
url
string
URL to which the webhook communicates.
store_id
string
Store id where the event triggers
state
string
Status of the webhook. Options available: ENABLE or DISABLE
secret
string
Secret key to create the security signature for every webhook event post.

DELETE webhook

Use this endpoint to delete a store from your webhook.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{EVENT}/remove-stores

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

Parameter Requirement Description
event
string
required The event name to update

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

DELETE https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/remove-stores

This is an example of the request:

{
   "stores":[
      "1000"
   ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/remove-stores");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
         "   \"stores\":[\n" +
         "      \"1000\"\n" +
         "   ]\n" +
         "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'DELETE',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/remove-stores',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "stores":[
        "1000"
    ]
});

req.setHeader('Content-Length', postData.length);

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/remove-stores"

payload = "{\n" \
         "   \"stores\":[\n" \
         "      \"1000\"\n" \
         "   ]\n" \
         "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/remove-stores"
    method := "DELETE"

    payload := strings.NewReader("{\n" +
        "   \"stores\":[\n" +
        "      \"1000\"\n" +
        "   ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
stores
array of strings
required List of the stores to delete the webhook from

Sample Response

This is an example of the response:

{
   "stores":[
      "1000"
   ],
   "message":"Store settings removed successfully."
}

This table describes the objects contained in the response example:

Response Object Object Description
stores
array of strings
List of the stores where the event triggers.
message
string
Output message of the request.

PUT webhook reset secret

Use this endpoint to reset the secret, and create a new one for the authenticated ally.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{EVENT}/reset-secret

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

Parameter Requirement Description
event
string
required The webhook event name to update

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/reset-secret

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/reset-secret");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/reset-secret',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/reset-secret"

headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "strings"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/reset-secret"
    method := "PUT"

    client := &http.Client{
    }
    req, err := http.NewRequest(method, url)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

{
  "event": "NEW_ORDER",
   "stores":[ {
        "store_id": "1000",
        "url": "http://localhost",
        "state": "ENABLE"
    }

   ],
   "secret":"NEW_SECRET"
}

This table describes the objects contained in the response example:

Response Object Object Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE
secret
string
New secret key to use when creating the security signature for a webhook event post.

PUT webhook change status

Use this endpoint to change the availability state of a configured webhook.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/v2/restaurants-integrations-public-api/webhook/{EVENT}/change-status

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-status

This is an example of the request:

{
  "stores": {
    "enable": [
      "1001"
    ],
    "disable": [
          "1000"
    ]
  }
}
URL url = new URL("https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-status");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\"stores\": {\"enable\": [\"1001\"],\"disable\": [\"1000\" ] } }";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-status',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    }
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "stores":{
         "enable": [
             "1001"
         ],
         "disable": [
             "1000"
         ]
    }
});

req.setHeader('Content-Length', postData.length);

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-status"

payload = "{\"stores\": {\"enable\": [\"1001\"],\"disable\": [\"1000\" ] } }"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/v2/restaurants-integrations-public-api/webhook/NEW_ORDER/change-status"
    method := "PUT"

    payload := strings.NewReader("{\"stores\": {\"enable\": [\"1001\"],\"disable\": [\"1000\" ] } }")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
stores
Object
required Object that contains the list of the stores to enable or disable
enable
array of strings
required List of the stores to enable
disable
array of strings
required List of the stores to disable

Sample Response

This is an example of the response:

{
   "event":"NEW_ORDER",
    "stores":[ {
          "store_id": "1001",
          "url": "http://localhost",
          "state": "ENABLE"
      },
      {
          "store_id": "1000",
          "url": "http://localhost",
          "state": "ENABLE"
      }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
event
string
Name of the event that triggers the webhook.
stores
array of Stores
List of the stores where the event triggers.
store_id
string
Store id where the event triggers
url
string
URL to which the webhook communicates.
state
string
Status of the webhook. Options available: ENABLE or DISABLE

Utils API v1.2.0

Utils API v1.2.0 includes all the resources, endpoints, and methods that assist you to manage your restaurant operation.

The following tables contains all the resources available to use with Utils API:

API Resource Corridor Schedules Endpoint Description
GET corridor/store/{storeId} Returns the collection of corridors for the store
GET corridor/schedule/{corridorId}/store/{storeId} Returns the corridor schedules configured for the store
POST corridor/schedule/{corridorId}/store/{storeId} Create corridor schedules for the store
PUT corridor/schedule/{corridorId}/store/{storeId} Update corridor schedules for the store
DELETE corridor/schedule/{corridorId}/store/{storeId}/{corridorProductScheduleId} Delete corridor schedules for the store
API Resource Corridor Schedules by Integration Endpoint Description
GET corridor/integration/{integrationId} Returns the collection of corridors for the store
GET corridor/schedule/{corridorId}/integration/{integrationId} Returns the corridor schedules configured for the store
POST corridor/schedule/{corridorId}/integration/{integrationId} Create corridor schedules for the store
PUT corridor/schedule/{corridorId}/integration/{integrationId} Update corridor schedules for the store
DELETE corridor/schedule/{corridorId}/integration/{integrationId}/{corridorProductScheduleId} Delete corridor schedules for the store
API Resource Product Schedules Endpoint Description
GET product/corridor/{corridorId}/store/{storeId} Returns the collection of products for the corridor and store
GET product/schedule/{productId}/corridor/{corridorId}/store/{storeId} Returns the product schedules configured for the corridor and store
POST product/schedule/{productId}/corridor/{corridorId}/store/{storeId} Create product schedules for the corridor and store
PUT product/schedule/{productId}/corridor/{corridorId}/store/{storeId} Update product schedules for the corridor and store
DELETE product/schedule/{productId}/corridor/{corridorId}/store/{storeId}/{corridorProductScheduleId} Delete product schedules for the corridor and store
API Resource Product Schedules by SKU Endpoint Description
GET sku/corridor/{corridorId}/integration/{integrationId} Returns the collection of products for the corridor and store
GET sku/schedule/{sku}/corridor/{corridorId}/integration/{integrationId} Returns the product schedules configured for the corridor and store
POST sku/schedule/{sku}/corridor/{corridorId}/integration/{integrationId} Create product schedules for the corridor and store
PUT sku/schedule/{sku}/corridor/{corridorId}/integration/{integrationId} Update product schedules for the corridor and store
DELETE sku/schedule/{sku}/corridor/{corridorId}/integration/{integrationId}/{corridorProductScheduleId} Delete product schedules for the corridor and store

Utils Getting Started

To start using the Utils API you must sign up as a Rappi ally. See details here Getting Started.

Once you receive your Rappi Credentials, you can create your Access Token with the POST token.

After generating your Access Token, you can start using the Utils API.

Utils Corridor Schedules By Store Id

Use the Utils resource to manage the Schedules configured in your stores.

The following table describes the different contents of the Schedules Utils resource:

Resource Description
GET corridor/store/{storeId} Returns the collection of corridors for the store
GET corridor/schedule/{corridorId}/store/{storeId} Returns the corridor schedules configured for the store
POST corridor/schedule/{corridorId}/store/{storeId} Create corridor schedules for the store
PUT corridor/schedule/{corridorId}/store/{storeId} Update corridor schedules for the store
DELETE corridor/schedule/{corridorId}/store/{storeId}/{corridorProductScheduleId} Delete corridor schedules for the store

GET corridor/store/{storeId}

Use this endpoint to retrieve the collections of corridors configured for your store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/corridor/store/{storeId}

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/store/999

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/store/999");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/store/999',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/store/999"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/store/999"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Response

This is an example of the response:

[
    {
        "id": 123,
        "name": "Bebidas Calientes",
        "description": "Corredor Bebidas Calientes",
        "storeId": 999
    },
    {
        "id": 321,
        "name": "Bebidas Frias",
        "description": "Corredor Bebidas Frias",
        "storeId": 999
    }
]

This table describes the objects contained in the response example:

Response Object Object Description
id
integer
Identifier of the corridor.
name
string
Name of the corridor.
description
string
Description of the corridor .
storeId
integer
Identifier of the store that contains the corridor. (The parent store identifier in case of child store request)

GET corridor/schedule/{corridorId}/store/{storeId}

Use this endpoint to obtain corridor schedules configured for the store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/corridor/schedule/{corridorId}/store/{storeId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/store/999

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/store/999");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/schedule/321/store/999',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/store/999"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/store/999"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

{
    "corridor_id": 321,
    "store_id": 999,
    "schedule_details": [
        {
            "id": 1,
            "days": "mon,tue,wed,thu,fri,sat,sun,hol",
            "starts_time": "08:00:00",
            "ends_time": "20:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where corridor must be available.
schedule_details.id
integer
Identifier of the corridor schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

POST corridor/schedule/{corridorId}/store/{storeId}

Use this endpoint to create schedules for your corridors in the store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/corridor/schedule/{corridorId}/store/{storeId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999

This is an example of the request:

{
  "schedule_details": [
    {
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "08:00:00",
        "ends_time": "20:00:00"
    },
    {
        "days": "hol",
        "starts_time": "13:00:00",
        "ends_time": "22:00:00"
    }
  ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"08:00:00\",\n" +
        "        \"ends_time\": \"20:00:00\"\n" +
        "    },\n" +
        "    {\n" +
        "        \"days\": \"hol\",\n" +
        "        \"starts_time\": \"13:00:00\",\n" +
        "        \"ends_time\": \"22:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'POST',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/schedule/123/store/999',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "schedule_details": [
    {
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "08:00:00",
        "ends_time": "20:00:00"
    },
    {
        "days": "hol",
        "starts_time": "13:00:00",
        "ends_time": "22:00:00"
    }
]});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999"

payload = "{\n" +
            "  \"schedule_details\": [\n" +
            "    {\n" +
            "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
            "        \"starts_time\": \"08:00:00\",\n" +
            "        \"ends_time\": \"20:00:00\"\n" +
            "    },\n" +
            "    {\n" +
            "        \"days\": \"hol\",\n" +
            "        \"starts_time\": \"13:00:00\",\n" +
            "        \"ends_time\": \"22:00:00\"\n" +
            "    }\n" +
            "  ]\n" +
            "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999"
    method := "POST"

    payload := strings.NewReader(""{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"08:00:00\",\n" +
        "        \"ends_time\": \"20:00:00\"\n" +
        "    },\n" +
        "    {\n" +
        "        \"days\": \"hol\",\n" +
        "        \"starts_time\": \"13:00:00\",\n" +
        "        \"ends_time\": \"22:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
schedule_details
array of objects
required List of the schedules for the given corridor.
schedule_details.days
string
required Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
strings
required A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
strings
required A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

Sample Response

This is an example of the response:

{
    "corridor_id": 123,
    "store_id": 999,
    "schedule_details": [
        {
            "id": 2,
            "days": "mon,tue,wed,thu,fri,sat,sun",
            "starts_time": "08:00:00",
            "ends_time": "20:00:00"
        },
        {
            "id": 3,
            "days": "hol",
            "starts_time": "13:00:00",
            "ends_time": "22:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where corridor must be available.
schedule_details.id
integer
Identifier of the corridor schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

PUT corridor/schedule/{corridorId}/store/{storeId}

Use this endpoint to update schedules for your corridors in the store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}api/rest-ops-utils/corridor/schedule/{corridorId}/store/{storeId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999

This is an example of the request:

{
  "schedule_details": [
    {
        "id": 2,
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "10:00:00",
        "ends_time": "16:00:00"
    }
  ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"id\": 2,\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"10:00:00\",\n" +
        "        \"ends_time\": \"16:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/schedule/123/store/999',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "schedule_details": [
    {
        "id": 2,
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "10:00:00",
        "ends_time": "16:00:00"
    }
]});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999"

payload = "{\n" +
            "  \"schedule_details\": [\n" +
            "    {\n" +
            "        \"id\": 2,\n" +
            "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
            "        \"starts_time\": \"10:00:00\",\n" +
            "        \"ends_time\": \"16:00:00\"\n" +
            "    }\n" +
            "  ]\n" +
            "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999"
    method := "PUT"

    payload := strings.NewReader(""{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"id\": 2,\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"10:00:00\",\n" +
        "        \"ends_time\": \"16:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
schedule_details
array of objects
required List of the schedules for the given corridor.
schedule_details.id
integer
required Identifier of the corridor schedule.
schedule_details.days
string
required Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
strings
required A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
strings
required A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

Sample Response

This is an example of the response:

{
    "corridor_id": 123,
    "store_id": 999,
    "schedule_details": [
        {
            "id": 2,
            "days": "mon,tue,wed,thu,fri,sat,sun",
            "starts_time": "10:00:00",
            "ends_time": "16:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where corridor must be available.
schedule_details.id
integer
Identifier of the corridor schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

DELETE corridor/schedule/{corridorId}/store/{storeId}/{corridorProductScheduleId}

Use this endpoint to delete schedules for your corridors in the store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}api/rest-ops-utils/corridor/schedule/{corridorId}/store/{storeId}/{corridorProductScheduleId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999/2541

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999/2541");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);


try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'DELETE',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/schedule/123/store/999/2541',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999/2541"

headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/store/999/2541"
    method := "PUT"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

{
    "corridor_id": 123,
    "store_id": 999,
    "schedule_details": [
        {
            "id": 2,
            "days": "mon,tue,wed,thu,fri,sat,sun",
            "starts_time": "10:00:00",
            "ends_time": "16:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of corridor schedules that are still available
schedule_details.id
integer
Identifier of the corridor schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

Utils Corridor Schedules By Integration Id

Use the Utils resource to manage the Schedules configured in your stores.

The following table describes the different contents of the Schedules Utils resource:

Resource Description
GET corridor/integration/{integrationId} Returns the collection of corridors for the store
GET corridor/schedule/{corridorId}/integration/{integrationId} Returns the corridor schedules configured for the store
POST corridor/schedule/{corridorId}/integration/{integrationId} Create corridor schedules for the store
PUT corridor/schedule/{corridorId}/integration/{integrationId} Update corridor schedules for the store

GET corridor/integration/{integrationId}

Use this endpoint to retrieve the collections of corridors configured for your store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/corridor/integration/{integrationId}

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/integration/888

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/integration/888");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/integration/888',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/integration/888"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/integration/888"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Response

This is an example of the response:

[
    {
        "id": 123,
        "name": "Bebidas Calientes",
        "description": "Corredor Bebidas Calientes",
        "integrationId": "888"
    },
    {
        "id": 321,
        "name": "Bebidas Frias",
        "description": "Corredor Bebidas Frias",
        "integrationId": "888"
    }
]

This table describes the objects contained in the response example:

Response Object Object Description
id
integer
Identifier of the corridor.
name
string
Name of the corridor.
description
string
Description of the corridor .
integrationId
string
Identifier of the store that contains the corridor. (The parent store identifier in case of child store request)

GET corridor/schedule/{corridorId}/integration/{integrationId}

Use this endpoint to obtain corridor schedules configured for the store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/corridor/schedule/{corridorId}/integration/{integrationId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/integration/888

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/integration/888");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/schedule/321/integration/888',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/integration/888"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/integration/888"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

{
    "corridor_id": 321,
    "integration_id": "888",
    "schedule_details": [
        {
            "id": 1,
            "days": "mon,tue,wed,thu,fri,sat,sun,hol",
            "starts_time": "08:00:00",
            "ends_time": "20:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
corridor_id
integer
Identifier of the corridor.
integration_id
string
Identifier of your store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where corridor must be available.
schedule_details.id
integer
Identifier of the corridor schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

POST corridor/schedule/{corridorId}/integration/{integrationId}

Use this endpoint to create schedules for your corridors in the store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/corridor/schedule/{corridorId}/integration/{integrationId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/integration/888

This is an example of the request:

{
  "schedule_details": [
    {
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "08:00:00",
        "ends_time": "20:00:00"
    },
    {
        "days": "hol",
        "starts_time": "13:00:00",
        "ends_time": "22:00:00"
    }
  ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/integration/888");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"08:00:00\",\n" +
        "        \"ends_time\": \"20:00:00\"\n" +
        "    },\n" +
        "    {\n" +
        "        \"days\": \"hol\",\n" +
        "        \"starts_time\": \"13:00:00\",\n" +
        "        \"ends_time\": \"22:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'POST',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/schedule/123/integration/888',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "schedule_details": [
    {
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "08:00:00",
        "ends_time": "20:00:00"
    },
    {
        "days": "hol",
        "starts_time": "13:00:00",
        "ends_time": "22:00:00"
    }
]});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/integration/888"

payload = "{\n" +
            "  \"schedule_details\": [\n" +
            "    {\n" +
            "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
            "        \"starts_time\": \"08:00:00\",\n" +
            "        \"ends_time\": \"20:00:00\"\n" +
            "    },\n" +
            "    {\n" +
            "        \"days\": \"hol\",\n" +
            "        \"starts_time\": \"13:00:00\",\n" +
            "        \"ends_time\": \"22:00:00\"\n" +
            "    }\n" +
            "  ]\n" +
            "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/integration/888"
    method := "POST"

    payload := strings.NewReader(""{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"08:00:00\",\n" +
        "        \"ends_time\": \"20:00:00\"\n" +
        "    },\n" +
        "    {\n" +
        "        \"days\": \"hol\",\n" +
        "        \"starts_time\": \"13:00:00\",\n" +
        "        \"ends_time\": \"22:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
schedule_details
array of objects
required List of the schedules for the given corridor.
schedule_details.days
string
required Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
strings
required A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
strings
required A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

Sample Response

This is an example of the response:

{
    "corridor_id": 123,
    "integration_id": "888",
    "schedule_details": [
        {
            "id": 2,
            "days": "mon,tue,wed,thu,fri,sat,sun",
            "starts_time": "08:00:00",
            "ends_time": "20:00:00"
        },
        {
            "id": 3,
            "days": "hol",
            "starts_time": "13:00:00",
            "ends_time": "22:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
corridor_id
integer
Identifier of the corridor.
integration_id
string
Identifier of your store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where corridor must be available.
schedule_details.id
integer
Identifier of the corridor schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

PUT corridor/schedule/{corridorId}/store/{storeId}

Use this endpoint to update schedules for your corridors in the store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}api/rest-ops-utils/corridor/schedule/{corridorId}/integration/{integrationId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/integration/888

This is an example of the request:

{
  "schedule_details": [
    {
        "id": 2,
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "10:00:00",
        "ends_time": "16:00:00"
    }
  ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/integration/888");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"id\": 2,\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"10:00:00\",\n" +
        "        \"ends_time\": \"16:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/schedule/123/integration/888',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "schedule_details": [
    {
        "id": 2,
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "10:00:00",
        "ends_time": "16:00:00"
    }
]});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/integration/888"

payload = "{\n" +
            "  \"schedule_details\": [\n" +
            "    {\n" +
            "        \"id\": 2,\n" +
            "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
            "        \"starts_time\": \"10:00:00\",\n" +
            "        \"ends_time\": \"16:00:00\"\n" +
            "    }\n" +
            "  ]\n" +
            "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/123/integration/888"
    method := "PUT"

    payload := strings.NewReader(""{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"id\": 2,\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"10:00:00\",\n" +
        "        \"ends_time\": \"16:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
schedule_details
array of objects
required List of the schedules for the given corridor.
schedule_details.id
integer
required Identifier of the corridor schedule.
schedule_details.days
string
required Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
strings
required A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
strings
required A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

Sample Response

This is an example of the response:

{
    "corridor_id": 123,
    "integration_id": "888",
    "schedule_details": [
        {
            "id": 2,
            "days": "mon,tue,wed,thu,fri,sat,sun",
            "starts_time": "10:00:00",
            "ends_time": "16:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
corridor_id
integer
Identifier of the corridor.
integration_id
integer
Identifier of your store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where corridor must be available.
schedule_details.id
integer
Identifier of the corridor schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

DELETE corridor/schedule/{corridorId}/integration/{integrationId}/{corridorProductScheduleId}

Use this endpoint to delete corridor schedules configured for the store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/corridor/schedule/{corridorId}/integration/{integrationId}/{corridorProductScheduleId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

DELETE https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/integration/888/254

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/integration/888/254");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'DELETE',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/schedule/321/integration/888/254',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/integration/888/254"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/corridor/schedule/321/integration/888/254"
    method := "DELETE"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

{
    "corridor_id": 321,
    "integration_id": "888",
    "schedule_details": [
        {
            "id": 1,
            "days": "mon,tue,wed,thu,fri,sat,sun,hol",
            "starts_time": "08:00:00",
            "ends_time": "20:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
corridor_id
integer
Identifier of the corridor.
integration_id
string
Identifier of your store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of corridor schedules that are still available.
schedule_details.id
integer
Identifier of the corridor schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the corridor begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the corridor becomes unavailable for users. 24 hour format HH:mm:ss

Utils Product Schedules By Product Id

Use the Utils resource to manage the Schedules configured in your stores.

The following table describes the different contents of the Schedules Utils resource:

Resource Description
GET product/corridor/{corridorId}/store/{storeId} Returns the collection of products for the corridor and store
GET product/schedule/{productId}/corridor/{corridorId}/store/{storeId} Returns the product schedules configured for the corridor and store
POST product/schedule/{productId}/corridor/{corridorId}/store/{storeId} Create product schedules for the corridor and store
PUT product/schedule/{productId}/corridor/{corridorId}/store/{storeId} Update product schedules for the corridor and store

GET product/corridor/{corridorId}/store/{storeId}

Use this endpoint to retrieve the collections of products configured for the given corridor and store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/product/corridor/{corridorId}/store/{storeId}

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/rest-ops-utils/product/corridor/123/store/999

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/product/corridor/123/store/999");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/corridor/store/999',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/product/corridor/123/store/999"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/product/corridor/123/store/999"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Response

This is an example of the response:

[
    {
        "product_id": 789,
        "name": "Americano Caliente 16 oz",
        "description": "16 oz. Espresso con agua caliente.",
        "corridor_id": 123,
        "store_id": 999
    },
    {
        "product_id": 987,
        "name": "Americano Caliente 20 oz",
        "description": "20 oz. Espresso con agua caliente.",
        "corridor_id": 123,
        "store_id": 999
    }
]

This table describes the objects contained in the response example:

Response Object Object Description
product_id
integer
Identifier of the product.
name
string
Name of the product.
description
string
Description of the product .
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store that contains the corridor. (The parent store identifier in case of child store request)

GET product/schedule/{productId}/corridor/{corridorId}/store/{storeId}

Use this endpoint to obtain product schedules configured for the corridor and store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/product/schedule/{productId}/corridor/{corridorId}/store/{storeId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/{productId}/corridor/{corridorId}/store/{storeId}

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'GET',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/product/schedule/789/corridor/123/store/999',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999"
    method := "GET"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

{
    "product_id": 789,
    "corridor_id": 123,
    "store_id": 999,
    "schedule_details": [
        {
            "id": 4,
            "days": "mon,tue,wed,thu,fri,sat,sun,hol",
            "starts_time": "08:00:00",
            "ends_time": "23:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
product_id
integer
Identifier of the product.
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where product must be available.
schedule_details.id
integer
Identifier of the product schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the product begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the product becomes unavailable for users. 24 hour format HH:mm:ss

POST product/schedule/{productId}/corridor/{corridorId}/store/{storeId}

Use this endpoint to create schedules for your products in the corridor and store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}api/rest-ops-utils/product/schedule/{productId}/corridor/{corridorId}/store/{storeId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

POST https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999

This is an example of the request:

{
  "schedule_details": [
    {
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "08:00:00",
        "ends_time": "20:00:00"
    },
    {
        "days": "hol",
        "starts_time": "13:00:00",
        "ends_time": "22:00:00"
    }
  ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"08:00:00\",\n" +
        "        \"ends_time\": \"20:00:00\"\n" +
        "    },\n" +
        "    {\n" +
        "        \"days\": \"hol\",\n" +
        "        \"starts_time\": \"13:00:00\",\n" +
        "        \"ends_time\": \"22:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'POST',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/product/schedule/789/corridor/123/store/999',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "schedule_details": [
    {
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "08:00:00",
        "ends_time": "20:00:00"
    },
    {
        "days": "hol",
        "starts_time": "13:00:00",
        "ends_time": "22:00:00"
    }
]});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999"

payload = "{\n" +
            "  \"schedule_details\": [\n" +
            "    {\n" +
            "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
            "        \"starts_time\": \"08:00:00\",\n" +
            "        \"ends_time\": \"20:00:00\"\n" +
            "    },\n" +
            "    {\n" +
            "        \"days\": \"hol\",\n" +
            "        \"starts_time\": \"13:00:00\",\n" +
            "        \"ends_time\": \"22:00:00\"\n" +
            "    }\n" +
            "  ]\n" +
            "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999"
    method := "POST"

    payload := strings.NewReader(""{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"08:00:00\",\n" +
        "        \"ends_time\": \"20:00:00\"\n" +
        "    },\n" +
        "    {\n" +
        "        \"days\": \"hol\",\n" +
        "        \"starts_time\": \"13:00:00\",\n" +
        "        \"ends_time\": \"22:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
schedule_details
array of objects
required List of the schedules for the given product.
schedule_details.days
string
required Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
strings
required A specific time where the product begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
strings
required A specific time where the product becomes unavailable for users. 24 hour format HH:mm:ss

Sample Response

This is an example of the response:

{
    "product_id": 789,
    "corridor_id": 123,
    "store_id": 999,
    "schedule_details": [
        {
            "id": 5,
            "days": "mon,tue,wed,thu,fri,sat,sun",
            "starts_time": "08:00:00",
            "ends_time": "20:00:00"
        },
        {
            "id": 6,
            "days": "hol",
            "starts_time": "13:00:00",
            "ends_time": "22:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
product_id
integer
Identifier of the product.
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where product must be available.
schedule_details.id
integer
Identifier of the product schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the product begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the product becomes unavailable for users. 24 hour format HH:mm:ss

PUT product/schedule/{productId}/corridor/{corridorId}/store/{storeId}

Use this endpoint to update schedules for your products in the corridor and store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}api/rest-ops-utils/product/schedule/{productId}/corridor/{corridorId}/store/{storeId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Request body requirements JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

PUT https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999

This is an example of the request:

{
  "schedule_details": [
    {
        "id": 5,
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "10:00:00",
        "ends_time": "16:00:00"
    }
  ]
}
URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");
connection.setDoOutput(true);

String jsonInputString = "{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"id\": 5,\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"10:00:00\",\n" +
        "        \"ends_time\": \"16:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}";

try (OutputStream os = connection.getOutputStream()) {
   byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
   os.write(input, 0, input.length);
}

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());

var https = require('https');

var options = {
    'method': 'PUT',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/product/schedule/789/corridor/123/store/999',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

var postData = JSON.stringify({
    "schedule_details": [
    {
        "id": 5,
        "days": "mon,tue,wed,thu,fri,sat,sun",
        "starts_time": "10:00:00",
        "ends_time": "16:00:00"
    }
]});

req.write(postData);

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999"

payload = "{\n" +
            "  \"schedule_details\": [\n" +
            "    {\n" +
            "        \"id\": 5,\n" +
            "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
            "        \"starts_time\": \"10:00:00\",\n" +
            "        \"ends_time\": \"16:00:00\"\n" +
            "    }\n" +
            "  ]\n" +
            "}"
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999"
    method := "PUT"

    payload := strings.NewReader(""{\n" +
        "  \"schedule_details\": [\n" +
        "    {\n" +
        "        \"id\": 5,\n" +
        "        \"days\": \"mon,tue,wed,thu,fri,sat,sun\",\n" +
        "        \"starts_time\": \"10:00:00\",\n" +
        "        \"ends_time\": \"16:00:00\"\n" +
        "    }\n" +
        "  ]\n" +
        "}")

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, payload)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

This table describes the attributes that the JSON of your request requires:

Attributes Requirement Description
schedule_details
array of objects
required List of the schedules for the given product.
schedule_details.id
integer
required Identifier of the product schedule.
schedule_details.days
string
required Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
strings
required A specific time where the product begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
strings
required A specific time where the product becomes unavailable for users. 24 hour format HH:mm:ss

Sample Response

This is an example of the response:

{
    "product_id": 789,
    "corridor_id": 123,
    "store_id": 999,
    "schedule_details": [
        {
            "id": 5,
            "days": "mon,tue,wed,thu,fri,sat,sun",
            "starts_time": "10:00:00",
            "ends_time": "16:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
product_id
integer
Identifier of the product.
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules where product must be available.
schedule_details.id
integer
Identifier of the product schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the product begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the product becomes unavailable for users. 24 hour format HH:mm:ss

DELETE product/schedule/{productId}/corridor/{corridorId}/store/{storeId}/{corridorProductScheduleId}

Use this endpoint to delete product schedules configured for the corridor and store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/product/schedule/{productId}/corridor/{corridorId}/store/{storeId}/{corridorProductScheduleId}

Endpoint Properties

This resource has the following properties:

Response formats JSON
Authentication requirements Token

Parameters

This endpoint does not permit additional parameters.

Status Codes

These are the possible status codes of the response for this endpoint:

Sample Request

This is an example of an API request using this endpoint:

DELETE https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/{productId}/corridor/{corridorId}/store/{storeId}/{corridorProductScheduleId}

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999/254");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setRequestProperty("x-authorization", "bearer YOUR_TOKEN");

try (BufferedReader br = new BufferedReader(
         new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
   StringBuilder response = new StringBuilder();
   String responseLine;
   while ((responseLine = br.readLine()) != null) {
         response.append(responseLine.trim());
   }
   System.out.println("Response body: " + response.toString());
}
System.out.println("Response Code : " + connection.getResponseCode());
var https = require('https');

var options = {
    'method': 'DELETE',
    'hostname': 'microservices.dev.rappi.com',
    'path': '/api/rest-ops-utils/product/schedule/789/corridor/123/store/999/254',
    'headers': {
        'Content-Type': 'application/json',
        'x-authorization': 'bearer YOUR_TOKEN'
    },
};

var req = https.request(options, function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

url = "https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999/254"

payload = {}
headers = {
   'Content-Type': 'application/json',
   'x-authorization': 'bearer YOUR_TOKEN'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text.encode('utf8'))
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://microservices.dev.rappi.com/api/rest-ops-utils/product/schedule/789/corridor/123/store/999/254"
    method := "DELETE"

    client := &http.Client {
    }
    req, err := http.NewRequest(method, url, nil)

    if err != nil {
        fmt.Println(err)
    }
    req.Header.Add("Content-Type", "application/json")
    req.Header.Add("x-authorization", "bearer YOUR_TOKEN")

    res, err := client.Do(req)
    defer res.Body.Close()
    body, err := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}

Sample Response

This is an example of the response:

{
    "product_id": 789,
    "corridor_id": 123,
    "store_id": 999,
    "schedule_details": [
        {
            "id": 4,
            "days": "mon,tue,wed,thu,fri,sat,sun,hol",
            "starts_time": "08:00:00",
            "ends_time": "23:00:00"
        }
    ]
}

This table describes the objects contained in the response example:

Response Object Object Description
product_id
integer
Identifier of the product.
corridor_id
integer
Identifier of the corridor.
store_id
integer
Identifier of the store. (The parent store identifier in case of child store request)
schedule_details
array of objects
List of the schedules that are still available.
schedule_details.id
integer
Identifier of the product schedule.
schedule_details.days
string
Days of the schedule. Days of the week: "mon,tue,wed,thu,fri,sat,sun", Holidays: "hol".
schedule_details.starts_time
string
A specific time where the product begins to be available for users. 24 hour format HH:mm:ss
schedule_details.ends_time
string
A specific time where the product becomes unavailable for users. 24 hour format HH:mm:ss

Utils Product Schedules by SKU

Use the Utils resource to manage the Schedules configured in your stores.

The following table describes the different contents of the Schedules Utils resource:

Resource Description
GET sku/corridor/{corridorId}/integration/{integrationId} Returns the collection of products for the corridor and store
GET sku/schedule/{sku}/corridor/{corridorId}/integration/{integrationId} Returns the product schedules configured for the corridor and store
POST sku/schedule/{sku}/corridor/{corridorId}/integration/{integrationId} Create product schedules for the corridor and store
PUT sku/schedule/{sku}/corridor/{corridorId}/integration/{integrationId} Update product schedules for the corridor and store

GET sku/corridor/{corridorId}/integration/{integrationId}

Use this endpoint to retrieve the collections of products configured for the given corridor and store.

Endpoint URL

Use this URL to make a request with this endpoint:

https://{COUNTRY_DOMAIN}/api/rest-ops-utils/sku/corridor/{corridorId}/integration/{integrationId}

Sample Request

This is an example of an API request using this endpoint:

GET https://microservices.dev.rappi.com/api/rest-ops-utils/sku/corridor/123/integration/888

This is an example of the request:

URL url = new URL("https://microservices.dev.rappi.com/api/rest-ops-utils/sku/corridor/123/integration/888");

HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("User-Agent", "Mozilla/5.0");
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection