RGL8R Agent Quickstart.postman Collection
Source: docs/postman/RGL8R-Agent-Quickstart.postman_collection.json
{
"info": {
"name": "RGL8R Agent Quickstart",
"description": "Token -> enqueue -> poll -> fetch quickstart flow for integration-key clients.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "1) Exchange Integration Token",
"request": {
"method": "POST",
"header": [
{
"key": "x-api-key",
"value": "{{integration_key}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/auth/token/integration",
"host": ["{{base_url}}"],
"path": ["api", "auth", "token", "integration"]
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"if (pm.response.code === 200) {",
" const json = pm.response.json();",
" if (json.access_token) pm.environment.set('bearer_token', json.access_token);",
"}"
]
}
}
]
},
{
"name": "2) Enqueue SIMA Batch",
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "Bearer {{bearer_token}}",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"skus\": null,\n \"runPolicy\": \"always\",\n \"screeningAuthority\": \"US\"\n}"
},
"url": {
"raw": "{{base_url}}/api/sima/batch",
"host": ["{{base_url}}"],
"path": ["api", "sima", "batch"]
}
},
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"if (pm.response.code === 202) {",
" const json = pm.response.json();",
" if (json.jobId) pm.environment.set('job_id', json.jobId);",
"}"
]
}
}
]
},
{
"name": "3) Poll Job",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{bearer_token}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/jobs/{{job_id}}",
"host": ["{{base_url}}"],
"path": ["api", "jobs", "{{job_id}}"]
}
}
},
{
"name": "4) Fetch SIMA Results",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{bearer_token}}",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/sima/results?limit=20",
"host": ["{{base_url}}"],
"path": ["api", "sima", "results"],
"query": [
{
"key": "limit",
"value": "20"
}
]
}
}
}
]
}