This documentation aims to provide all the information you need to work with our API.
To authenticate requests, include an Authorization
header with the value "Bearer {ACCESS_TOKEN}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
To connect to Roborder API, you can use the standard OAuth 2 to get an ACCESS TOKEN.
To use OAuth, follow these steps in your Roborder Dashboard to generate OAuth Credentials:
To obtain an authorization code, redirect user to Roborder with the following URL:
User will accept the request via the authorization page, they will be redirected to the specified redirect URI (https://your-app.com/callback). You can then exchange the authorization code for an access token.
curl --request POST \
--post "https://api.roborder.ai/oauth/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--form-data "{
\"grant_type\": \"authorization_code\",
\"client_id\": \"< CLIENT ID >\"
\"client_secret\": \"< CLIENT SECRET >\"
\"redirect_uri\": \"https://your-app.com/callback\"
\"code\": \"< CODE >"
}"
{
"token_type": "Bearer",
"expires_in": 31536000,
"access_token": "< ACCESS TOKEN >",
"refresh_token": "< REFRESH TOKEN >"
}
The access token typically has a lifetime of one year unless it's revoked. You can refresh it using the refresh_token attribute you got from the response. Here's an example of how to refresh it:
curl --request POST \
--post "https://api.roborder.ai/oauth/token" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--form-data "{
\"grant_type\": \"authorization_code\",
\"client_id\": \"< CLIENT ID >\"
\"client_secret\": \"< CLIENT SECRET >\"
\"redirect_uri\": \"https://your-app.com/callback\"
\"code\": \"< CODE >"
}"
curl --request GET \
--get "https://api.roborder.ai/v1/user" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"user_id\": \"1111\"
}"
{
"success":true,
"data": {
"id": 1111,
"email": "user@gmail.com",
},
"message":"Get User successfully."
}
curl --request POST \
"https://api.roborder.ai/v1/products" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"eius\",
\"sku\": \"ab\",
\"link\": \"https:\\/\\/www.example.com\\/product-name\",
\"sell_price\": 100,
\"image\": \"https:\\/\\/www.example.com\\/product-name.jpg\",
\"description\": \"Perferendis nam voluptatem cumque vel omnis.\"
}"
{
"success": true,
"message": "Product stored successfully."
}
curl --request GET \
--get "https://api.roborder.ai/v1/products" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
{
"success":true,
"data": {
"id": 1,
"sku": "product-sku",
"name": "product-name",
"description": "product-description",
"link": "https://www.example.com/product-name",
"sell_price": 100
"image": "https://www.example.com/product-name.jpg"
},
"message":"Get Products successfully."
}
curl --request GET \
--get "https://api.roborder.ai/v1/orders" \
--header "Authorization: Bearer {ACCESS_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
{
"success":true,
"data": {
"id": 1,
"customer_name": "customer-name",
"platform": "Facebook",
"phone": "22222222",
"page": {
"id": "1",
"name": "page-name",
"link": "https://www.facebook.com/100089461361197004",
},
"products": [
{
"id": 1,
"sku": "1234",
"name": "product-name",
"link": "https://www.example.com/product-name",
"price": 100,
}
],
"sheet": {
"id": 1,
"spreadsheet_name": "sheet-name",
"spreadsheet_id": "1k4IwMwZQdwciuXA1mCOnGEL2pSWmMXwJyzHvbbXVu7o",
"email": "user@gmail.com"
}
},
"message":"Get Orders successfully."
}