{ "opencollection": "1.0.0", "info": { "name": "Admin Account / Address Promotion Rules API", "version": "v3" }, "items": [ { "info": { "name": "Promotion Rules", "type": "folder" }, "items": [ { "info": { "name": "Return a list of Promotion Rules", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v2/platform/promotion_rules", "params": [ { "name": "page", "value": "1", "type": "query" }, { "name": "per_page", "value": "50", "type": "query" }, { "name": "include", "value": "user", "type": "query", "description": "Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes" }, { "name": "filter[type_eq]", "value": "Spree::Promotion::Rules::Product", "type": "query" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns a list of Promotion Rules" }, { "info": { "name": "Create a Promotion Rule", "type": "http" }, "http": { "method": "POST", "url": "http://{defaultHost}/api/v2/platform/promotion_rules", "params": [ { "name": "include", "value": "user", "type": "query", "description": "Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates a Promotion Rule" }, { "info": { "name": "Return a Promotion Rule", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v2/platform/promotion_rules/:id", "params": [ { "name": "id", "value": "", "type": "path" }, { "name": "include", "value": "user", "type": "query", "description": "Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns a Promotion Rule" }, { "info": { "name": "Update a Promotion Rule", "type": "http" }, "http": { "method": "PATCH", "url": "http://{defaultHost}/api/v2/platform/promotion_rules/:id", "params": [ { "name": "id", "value": "", "type": "path" }, { "name": "include", "value": "user", "type": "query", "description": "Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates a Promotion Rule" }, { "info": { "name": "Delete a Promotion Rule", "type": "http" }, "http": { "method": "DELETE", "url": "http://{defaultHost}/api/v2/platform/promotion_rules/:id", "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes a Promotion Rule" } ] } ], "bundled": true }