{ "opencollection": "1.0.0", "info": { "name": "Admin Account / Address Option Types API", "version": "v3" }, "items": [ { "info": { "name": "Option Types", "type": "folder" }, "items": [ { "info": { "name": "List option types", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v3/admin/option_types", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "page", "value": "", "type": "query", "description": "Page number" }, { "name": "limit", "value": "", "type": "query", "description": "Number of records per page" }, { "name": "q[name_cont]", "value": "", "type": "query", "description": "Filter by name (contains)" }, { "name": "expand", "value": "", "type": "query", "description": "Comma-separated associations to expand (e.g., option_values). Use dot notation for nested expand (max 4 levels)." }, { "name": "fields", "value": "", "type": "query", "description": "Comma-separated list of fields to include (e.g., name,label,position). id is always included." } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Returns a paginated list of option types.\n\n**Required scope:** `read_products` (for API-key authentication)." }, { "info": { "name": "Create an option type", "type": "http" }, "http": { "method": "POST", "url": "http://{defaultHost}/api/v3/admin/option_types", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Creates a new option type. Supports nested option values.\n\nOption values can be provided inline and will be created or updated by name.\n\n\n**Required scope:** `write_products` (for API-key authentication)." }, { "info": { "name": "Get an option type", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v3/admin/option_types/:id", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path", "description": "Option type ID" }, { "name": "expand", "value": "", "type": "query", "description": "Comma-separated associations to expand (e.g., option_values). Use dot notation for nested expand (max 4 levels)." }, { "name": "fields", "value": "", "type": "query", "description": "Comma-separated list of fields to include (e.g., name,label,position). id is always included." } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Returns a single option type by ID, including its option values.\n\n**Required scope:** `read_products` (for API-key authentication)." }, { "info": { "name": "Update an option type", "type": "http" }, "http": { "method": "PATCH", "url": "http://{defaultHost}/api/v3/admin/option_types/:id", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path", "description": "Option type ID" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Updates an option type. Supports updating nested option values.\n\n**Required scope:** `write_products` (for API-key authentication)." }, { "info": { "name": "Delete an option type", "type": "http" }, "http": { "method": "DELETE", "url": "http://{defaultHost}/api/v3/admin/option_types/:id", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "id", "value": "", "type": "path", "description": "Option type ID" } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Deletes an option type.\n\n**Required scope:** `write_products` (for API-key authentication)." }, { "info": { "name": "Return a list of Option Types", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v2/platform/option_types", "params": [ { "name": "page", "value": "1", "type": "query" }, { "name": "per_page", "value": "50", "type": "query" }, { "name": "filter[option_type_id_eq]", "value": "1", "type": "query" }, { "name": "filter[name_cont]", "value": "Size", "type": "query" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns a list of Option Types" }, { "info": { "name": "Create an Option Type", "type": "http" }, "http": { "method": "POST", "url": "http://{defaultHost}/api/v2/platform/option_types", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates an Option Type" }, { "info": { "name": "Return an Option Type", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v2/platform/option_types/:id", "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns an Option Type" }, { "info": { "name": "Update an Option Type", "type": "http" }, "http": { "method": "PATCH", "url": "http://{defaultHost}/api/v2/platform/option_types/:id", "params": [ { "name": "id", "value": "", "type": "path" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates an Option Type" }, { "info": { "name": "Delete an Option Type", "type": "http" }, "http": { "method": "DELETE", "url": "http://{defaultHost}/api/v2/platform/option_types/:id", "params": [ { "name": "id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes an Option Type" } ] } ], "bundled": true }