openapi: 3.1.0 info: title: Commerce Layer addresses merchants 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: merchants description: resource type paths: /markets/{marketId}/merchant: get: operationId: GET/marketId/merchant summary: Retrieve the merchant associated to the market description: Retrieve the merchant associated to the market tags: - merchants parameters: - name: marketId in: path schema: type: string required: true description: The resource's id responses: '200': description: The merchant associated to the market /merchants: get: operationId: GET/merchants summary: List all merchants description: List all merchants tags: - merchants responses: '200': description: A list of merchant objects content: application/vnd.api+json: schema: $ref: '#/components/schemas/merchantResponseList' post: operationId: POST/merchants summary: Create a merchant description: Create a merchant tags: - merchants requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/merchantCreate' responses: '201': description: The created merchant object content: application/vnd.api+json: schema: $ref: '#/components/schemas/merchantResponse' /merchants/{merchantId}: get: operationId: GET/merchants/merchantId summary: Retrieve a merchant description: Retrieve a merchant tags: - merchants parameters: - name: merchantId in: path schema: type: string required: true description: The resource's id responses: '200': description: The merchant object content: application/vnd.api+json: schema: $ref: '#/components/schemas/merchantResponse' patch: operationId: PATCH/merchants/merchantId summary: Update a merchant description: Update a merchant tags: - merchants parameters: - name: merchantId in: path schema: type: string required: true description: The resource's id requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/merchantUpdate' responses: '200': description: The updated merchant object content: application/vnd.api+json: schema: $ref: '#/components/schemas/merchantResponse' delete: operationId: DELETE/merchants/merchantId summary: Delete a merchant description: Delete a merchant tags: - merchants parameters: - name: merchantId in: path schema: type: string required: true description: The resource's id responses: '204': description: No content /stores/{storeId}/merchant: get: operationId: GET/storeId/merchant summary: Retrieve the merchant associated to the store description: Retrieve the merchant associated to the store tags: - merchants parameters: - name: storeId in: path schema: type: string required: true description: The resource's id responses: '200': description: The merchant associated to the store components: schemas: merchant: properties: data: properties: attributes: type: object properties: name: type: string description: The merchant's internal name. example: The Brand Inc. nullable: false 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 merchantUpdate: required: - data type: object properties: data: type: object required: - type - id - attributes properties: type: type: string description: The resource's type enum: - merchants id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN attributes: type: object properties: name: type: string description: The merchant's internal name. example: The Brand Inc. 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 relationships: type: object properties: address: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - addresses id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN merchantResponseList: type: object properties: data: type: array items: $ref: '#/components/schemas/merchantResponse/properties/data' merchantResponse: 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: - merchants links: type: object properties: self: type: string description: URL attributes: $ref: '#/components/schemas/merchant/properties/data/properties/attributes' relationships: type: object properties: address: 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: - address id: type: string description: The resource ID attachments: 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: - attachments 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 merchantCreate: required: - data type: object properties: data: type: object required: - type - attributes properties: type: type: string description: The resource's type enum: - merchants attributes: type: object properties: name: type: string description: The merchant's internal name. example: The Brand Inc. 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: address: required: - data type: object properties: data: type: object properties: type: type: string description: The resource's type enum: - addresses id: type: string description: Unique identifier for the resource (hash). example: XAyRWNUzyN required: - address securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT