openapi: 3.1.0 info: title: Public Imprint Customer Links API version: '2.0' servers: - url: https://dev.sbx.imprint.co description: Imprint public api sandbox security: - basicAuth: [] - bearerAuth: [] tags: - name: Customer Links paths: /v2/customers/{customer_id}/link: post: tags: - Customer Links summary: Link an Imprint customer and partner customer accounts description: Creates a link between an existing Imprint customer and a partner's customer account. The API key provided with the request will be used to link the partner with the imprint customer. operationId: linkCustomerAccount parameters: - name: customer_id in: path required: true description: The unique identifier for the Imprint customer schema: type: string example: BBB815E9-F654-438D-9AD3-3F7BB8136FC0 requestBody: required: true content: application/json: schema: type: object required: - partner_customer_id properties: partner_customer_id: $ref: '#/components/schemas/PartnerCustomerId' metadata: type: object description: Additional linking metadata additionalProperties: true example: store_id: store_789 platform_version: 2.1.0 responses: '200': description: Customer accounts linked successfully content: application/json: schema: $ref: '#/components/schemas/CustomerLink' '400': description: Invalid request content: application/json: schema: $ref: '#/components/schemas/InvalidRequestError' '404': description: Customer not found content: application/json: schema: $ref: '#/components/schemas/CustomerNotFoundError' '409': description: Customer already linked content: application/json: schema: type: object required: - error properties: error: type: object required: - type - message properties: type: type: string description: Error type (e.g., CUSTOMER_ALREADY_LINKED) message: type: string example: Customer already linked to a partner account existing_link: $ref: '#/components/schemas/CustomerLink' components: schemas: CustomerLink: type: object required: - customer_id - partner_customer_id - status - created_at properties: customer_id: type: string example: 9B5E1EE0-2E1C-46E7-81B9-3C3917204BE4 description: The ID of the Imprint customer partner_customer_id: $ref: '#/components/schemas/PartnerCustomerId' status: type: string enum: - ACTIVE - INACTIVE example: ACTIVE description: Status of the linked relationship created_at: type: string description: the RFC-3339 timestamp when the link was created at. example: 2025-02-13 19:08:07+00:00 updated_at: type: string description: the RFC-3339 timestamp when the link was last updated. example: 2025-02-13 19:08:07+00:00 metadata: type: object description: Additional linking metadata additionalProperties: true example: store_id: store_789 platform_version: 2.1.0 CustomerNotFoundError: type: object required: - type - message properties: type: type: string description: The category of error being returned example: CUSTOMER_NOT_FOUND_ERROR message: type: string description: A message describing the cause of the error example: 'Customer not found for provided ID: CSMR-v1-123' param: type: string description: The param causing the error example: customer_id PartnerCustomerId: type: string description: The unique identifier for the customer in the partner's system example: PARTNER_USER_456 InvalidRequestError: type: object properties: path: type: string description: The path of the endpoint returning the error example: /v2/customers details: type: array items: type: string description: The details of the error being returned example: - 'email: must be a well-formed email address' error: type: string description: The category of error being returned example: Bad Request status: type: integer description: The HTTP status code of the error example: 400 timestamp: type: string description: The timestamp that the error occurred example: '2025-01-20T18:18:22.923+00:00' securitySchemes: basicAuth: type: http scheme: basic description: 'Basic HTTP authentication. Allowed headers-- Authorization: Basic ' bearerAuth: bearerFormat: auth-scheme description: 'Bearer HTTP authentication. Allowed headers-- Authorization: Bearer ' scheme: bearer type: http