openapi: 3.1.0 info: title: Commerce Layer addresses stores API version: 7.10.1 contact: name: API Support url: https://commercelayer.io email: support@commercelayer.io description: Headless Commerce for Global Brands. servers: - url: https://{your_organization_slug}.commercelayer.io/api description: API - url: https://core.commercelayer.io/users/sign_in description: Sign in - url: https://docs.commercelayer.io/api description: API reference security: - bearerAuth: [] tags: - name: stores description: resource type paths: /markets/{marketId}/stores: get: operationId: GET/marketId/stores summary: Retrieve the stores associated to the market description: Retrieve the stores associated to the market tags: - stores parameters: - name: marketId in: path schema: type: string required: true description: The resource's id responses: '200': description: The stores associated to the market /orders/{orderId}/store: get: operationId: GET/orderId/store summary: Retrieve the store associated to the order description: Retrieve the store associated to the order tags: - stores parameters: - name: orderId in: path schema: type: string required: true description: The resource's id responses: '200': description: The store associated to the order /payment_methods/{paymentMethodId}/store: get: operationId: GET/paymentMethodId/store summary: Retrieve the store associated to the payment method description: Retrieve the store associated to the payment method tags: - stores parameters: - name: paymentMethodId in: path schema: type: string required: true description: The resource's id responses: '200': description: The store associated to the payment method /stock_locations/{stockLocationId}/stores: get: operationId: GET/stockLocationId/stores summary: Retrieve the stores associated to the stock location description: Retrieve the stores associated to the stock location tags: - stores parameters: - name: stockLocationId in: path schema: type: string required: true description: The resource's id responses: '200': description: The stores associated to the stock location /stores: get: operationId: GET/stores summary: List all stores description: List all stores tags: - stores responses: '200': description: A list of store objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/storeResponseList' post: operationId: POST/stores summary: Create a store description: Create a store tags: - stores requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/storeCreate' responses: '201': description: The created store object content: application/vnd.api+json: schema: $ref: '#/components/schemas/storeResponse' /stores/{storeId}: get: operationId: GET/stores/storeId summary: Retrieve a store description: Retrieve a store tags: - stores parameters: - name: storeId in: path schema: type: string required: true description: The resource's id responses: '200': description: The store object content: application/vnd.api+json: schema: $ref: '#/components/schemas/storeResponse' patch: operationId: PATCH/stores/storeId summary: Update a store description: Update a store tags: - stores parameters: - name: storeId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/storeUpdate' responses: '200': description: The updated store object content: application/vnd.api+json: schema: $ref: '#/components/schemas/storeResponse' delete: operationId: DELETE/stores/storeId summary: Delete a store description: Delete a store tags: - stores parameters: - name: storeId in: path schema: type: string required: true description: The resource's id responses: '204': description: No content components: schemas: storeResponse: type: object properties: data: type: object properties: id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN type: type: string description: The resource's type enum: - stores links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/store/properties/data/properties/attributes' relationships: type: object properties: market: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - market id: type: string description: The resource ID merchant: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - merchant id: type: string description: The resource ID stock_location: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - stock_location id: type: string description: The resource ID orders: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - orders id: type: string description: The resource ID payment_methods: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - payment_methods id: type: string description: The resource ID events: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - events id: type: string description: The resource ID event_stores: type: object properties: links: type: object properties: self: type: string description: URL related: type: string description: URL data: type: object properties: type: type: string description: The resource's type enum: - event_stores id: type: string description: The resource ID store: properties: data: properties: attributes: type: object properties: name: type: string description: The store's internal name. example: Rome Shop nullable: false code: type: string description: A string that you can use to identify the store (must be unique within the environment). example: europe1 nullable: true created_at: type: string description: Time at which the resource was created. example: '2018-01-01T12:00:00.000Z' nullable: false updated_at: type: string description: Time at which the resource was last updated. example: '2018-01-01T12:00:00.000Z' nullable: false reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true storeResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/storeResponse/properties/data' storeUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - stores id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: name: type: string description: The store's internal name. example: Rome Shop nullable: false code: type: string description: A string that you can use to identify the store (must be unique within the environment). example: europe1 nullable: true reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE nullable: true reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN nullable: true metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar nullable: true relationships: type: object properties: market: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN merchant: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - merchants id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN stock_location: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_locations id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN storeCreate: required: - data type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - stores attributes: type: object properties: name: type: string description: The store's internal name. example: Rome Shop code: type: string description: A string that you can use to identify the store (must be unique within the environment). example: europe1 reference: type: string description: A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. example: ANY-EXTERNAL-REFEFERNCE reference_origin: type: string description: Any identifier of the third party system that defines the reference code. example: ANY-EXTERNAL-REFEFERNCE-ORIGIN metadata: type: object description: Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. example: foo: bar required: - name relationships: type: object properties: market: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - markets id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN merchant: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - merchants id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN stock_location: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - stock_locations id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN required: - market securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT