UBER-EATS-Wrapper/postman/Uber_Wrapper.postman_collection.json

229 lines
4.8 KiB
JSON

{
"info": {
"_postman_id": "3f2bc407-ec9d-4eef-b77d-74359eb281fe",
"name": "Uber Wrapper",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Health",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/health",
"host": [
"{{baseUrl}}"
],
"path": [
"health"
]
}
}
},
{
"name": "Create Merchant",
"request": {
"method": "POST",
"header": [
{
"key": "x-api-key",
"value": "{{apiKey}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Demo Restaurant\",\n \"externalRef\": \"pos_001\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/merchants",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"merchants"
]
}
}
},
{
"name": "Get OAuth URL",
"request": {
"method": "GET",
"header": [
{
"key": "x-api-key",
"value": "{{apiKey}}"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/auth/uber/authorize-url?merchantId={{merchantId}}",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"auth",
"uber",
"authorize-url"
],
"query": [
{
"key": "merchantId",
"value": "{{merchantId}}"
}
]
}
}
},
{
"name": "Check Domain Pairing",
"request": {
"method": "GET",
"header": [
{
"key": "x-api-key",
"value": "{{apiKey}}"
}
],
"url": {
"raw": "{{baseUrl}}/api/v1/auth/uber/domain-pairing-status",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"auth",
"uber",
"domain-pairing-status"
]
}
}
},
{
"name": "Client Credentials Token",
"request": {
"method": "POST",
"header": [
{
"key": "x-api-key",
"value": "{{apiKey}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"scope\": \"eats.order\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/auth/uber/client-credentials-token",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"auth",
"uber",
"client-credentials-token"
]
}
}
},
{
"name": "Replace Menu (PUT)",
"request": {
"method": "PUT",
"header": [
{
"key": "x-api-key",
"value": "{{apiKey}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"merchantId\": \"{{merchantId}}\",\n \"storeId\": \"{{storeId}}\",\n \"menu\": {\n \"categories\": []\n }\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/uber/menu/replace",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"uber",
"menu",
"replace"
]
}
}
},
{
"name": "Generic Uber Request",
"request": {
"method": "POST",
"header": [
{
"key": "x-api-key",
"value": "{{apiKey}}"
},
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"merchantId\": \"{{merchantId}}\",\n \"method\": \"GET\",\n \"path\": \"/v1/eats/stores/{{storeId}}/orders\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/v1/uber/request",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v1",
"uber",
"request"
]
}
}
}
],
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:8080"
},
{
"key": "apiKey",
"value": "change-me"
},
{
"key": "merchantId",
"value": ""
},
{
"key": "storeId",
"value": ""
}
]
}