{ "opencollection": "1.0.0", "info": { "name": "Addresses Introduction Account Addresses Rule Promotion Jobs API", "version": "25.1126.6886238" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "Rule Promotion Jobs", "type": "folder" }, "items": [ { "info": { "name": "Get Rule Promotion Jobs", "type": "http" }, "http": { "method": "GET", "url": "https://useast.api.elasticpath.com/v2/rule-promotions/:uuid/jobs", "params": [ { "name": "uuid", "value": "", "type": "path", "description": "The unique identifier of a rule promotion." }, { "name": "filter", "value": "", "type": "query", "description": "Specifies filter attributes." } ] }, "docs": "Retrieves a list of jobs associated with a specific rule promotion. Each job represents an asynchronous operation such as promotion code generation or export.\n\nThe response includes details such as:\n- **Job type** (`code_generate` or `code_export`)\n- **Job status** (`pending`, `processing`, `completed`, `failed`, `cancelling`, or `cancelled`)\n- **Parameters used** (such as number of codes generated)\n- **Results** (such as number of codes successfully generated or deleted)\n\n### Filtering\nYou can " }, { "info": { "name": "Create a Rule Promotion Job", "type": "http" }, "http": { "method": "POST", "url": "https://useast.api.elasticpath.com/v2/rule-promotions/:uuid/jobs", "params": [ { "name": "uuid", "value": "", "type": "path", "description": "The unique identifier of the rule promotion." } ], "body": { "type": "json", "data": "{}" } }, "docs": "Creates an asynchronous job for a specific Rule Promotion. Jobs are used to generate or export promotion codes in bulk.\n\nThe following job types are supported:\n- **`code_generate`**: Generates a batch of unique promotion codes.\n- **`code_export`**: Exports all existing promotion codes as a downloadable CSV file.\n\nJob processing occurs asynchronously. The job request is queued, and its status must be checked separately.\n\n### Job Processing Status\nJobs can have the following statuses:\n- `pending`:" }, { "info": { "name": "Get Rule Promotion Code Exported File", "type": "http" }, "http": { "method": "GET", "url": "https://useast.api.elasticpath.com/v2/rule-promotions/:uuid/jobs/:job-uuid/file", "params": [ { "name": "uuid", "value": "", "type": "path", "description": "The unique identifier of the rule promotion." }, { "name": "job-uuid", "value": "", "type": "path", "description": "The unique identifier of the job associated with the file." } ] }, "docs": "Retrieves the exported promotion codes for a rule promotion job in a CSV format.\n\n- The file contains the generated codes along with relevant metadata.\n- This endpoint is applicable only for jobs of type `code_export`.\n- The job must be in a `completed` state before the file can be retrieved.\n" }, { "info": { "name": "Cancel a Rule Promotion Job", "type": "http" }, "http": { "method": "POST", "url": "https://useast.api.elasticpath.com/v2/rule-promotions/:uuid/jobs/:job-uuid/cancel", "params": [ { "name": "uuid", "value": "", "type": "path", "description": "The unique identifier of the rule promotion." }, { "name": "job-uuid", "value": "", "type": "path", "description": "The unique identifier of the job to be canceled." } ] }, "docs": "Cancels an asynchronous job for a rule promotion if its status is `pending` or `processing`.\n\n- Only jobs that have not yet completed can be canceled.\n- Once canceled, no further processing occurs, and partially completed results may be deleted.\n" } ] } ], "bundled": true }