openapi: 3.2.0 info: title: Rest Merchants API description: 'Justt official REST api, you can find our docs here: https://justt.readme.io/' version: 1.0.0 contact: {} servers: - url: https://api.justt.ai/v1 tags: - name: Merchants paths: /merchants: get: description: Retrieve a list of merchants with optional filtering and pagination operationId: MerchantsController_getMerchants parameters: - name: limit required: false in: query description: The number of items to return between 10 to 100 schema: default: 10 example: '10' type: number - name: page required: false in: query description: The offset of the first item to return schema: default: 1 example: '1' type: number responses: '200': description: List of merchants retrieved successfully content: application/json: schema: $ref: '#/components/schemas/GetMerchantsResponseDto' '400': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '404': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '500': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' security: - bearer: [] summary: Get merchants tags: - Merchants delete: description: 'Deactivate a merchant (note: merchant is not removed, only deactivated)' operationId: MerchantsController_deactivateMerchant parameters: - name: reference-account-id in: header description: If your account encompasses multiple merchants, you should use this header to specify the account you are working on (https://developers.justt.ai/docs/reference-accounts) required: false schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeactivateMerchantDto' responses: '200': description: Merchant deactivated successfully '400': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '404': description: Merchant not found content: application/json: schema: example: message: Merchant not found statusCode: 404 '500': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' security: - bearer: [] summary: Deactivate merchant tags: - Merchants post: description: Create a new merchant with business profile information operationId: MerchantsController_createMerchant parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateMerchantDto' responses: '201': description: Merchant created successfully content: application/json: schema: $ref: '#/components/schemas/CreateMerchantResponseDto' '400': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '404': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '500': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' security: - bearer: [] summary: Create merchant tags: - Merchants /merchants/{merchantUuid}: get: description: Retrieve a single merchant by its UUID operationId: MerchantsController_getMerchant parameters: - name: merchantUuid required: true in: path description: A unique merchant Identifier (UUID) set by Justt schema: example: 04318fb0-e4ff-4712-972e-4db99b3fb23d type: string responses: '200': description: Merchant retrieved successfully content: application/json: schema: $ref: '#/components/schemas/MerchantResponseDto' '400': description: Invalid merchant UUID format '404': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' '500': description: In the message you can find explanation of what went wrong, please provide the error ID for our support for future investigation if needed content: application/json: schema: $ref: '#/components/schemas/ErrorResponseDTO' security: - bearer: [] summary: Get merchant by ID tags: - Merchants components: schemas: CreateMerchantDto: type: object properties: merchantName: type: string description: The name of the merchant example: Example Store Name websiteUrl: type: string description: The website URL of the merchant example: https://example.com/ email: type: string description: Email address of the merchant contact example: contact@example.com firstName: type: string description: First name of the merchant contact example: John lastName: type: string description: Last name of the merchant contact example: Doe referenceId: type: string description: External reference ID for the merchant example: EXAMPLE_001 mcc: type: string description: Merchant Category Code (MCC) example: '5411' mccDescription: type: string description: Description of the Merchant Category Code example: Grocery Stores, Supermarkets required: - merchantName - websiteUrl - email - firstName - lastName CreateMerchantResponseDto: type: object properties: merchantUuid: type: string description: UUID of the created merchant example: 550e8400-e29b-41d4-a716-446655440000 format: uuid required: - merchantUuid MerchantOverallStatus: type: string enum: - SetupIncomplete - Active - ScheduledForActivation - Inactive - IntegrationError - ReadyAwaitingGoLiveDate - ReadyScheduledGoLiveDate - AllIntegrationDown - AllIntegrationValidate - PartiallyActiveByError - PartiallyActiveByValidation description: Current status of the merchant DeactivateMerchantDto: type: object properties: deactivationType: description: Type of deactivation example: postingDate allOf: - $ref: '#/components/schemas/DeactivationType' deactivationDate: format: date-time type: string description: Date when the deactivation should take effect example: '2024-01-01T00:00:00.000Z' required: - deactivationType - deactivationDate MerchantResponseDto: type: object properties: merchantName: type: string description: The name of the merchant example: Acme Corporation referenceId: type: string description: External reference ID for the merchant example: MERCHANT_001 status: description: Current status of the merchant example: Active allOf: - $ref: '#/components/schemas/MerchantOverallStatus' merchantUuid: type: string description: UUID of the merchant example: 550e8400-e29b-41d4-a716-446655440000 format: uuid required: - merchantName - referenceId - status - merchantUuid ErrorResponseDTO: type: object properties: status: type: number example: 500 description: Error status of the response message: type: string example: Internal Server Error description: Description of the error that occurred errorId: type: string example: 04318fb0-e4ff-4712-972e-4db99b3fb23c description: A unique identifier you can provide to our support for a better troubleshooting process required: - status - message DeactivationType: type: string enum: - postingDate - dueDate description: Type of deactivation GetMerchantsResponseDto: type: object properties: status: example: 201 description: The status of the response allOf: - $ref: '#/components/schemas/HttpStatus' message: type: string example: success description: The message of the response hasMore: type: boolean example: 'true' description: An indicator if there are more items to return data: description: The requested merchants data type: array items: $ref: '#/components/schemas/MerchantResponseDto' required: - status - message - hasMore - data HttpStatus: type: number enum: - 100 - 101 - 102 - 103 - 200 - 201 - 202 - 203 - 204 - 205 - 206 - 207 - 208 - 210 - 300 - 301 - 302 - 303 - 304 - 307 - 308 - 400 - 401 - 402 - 403 - 404 - 405 - 406 - 407 - 408 - 409 - 410 - 411 - 412 - 413 - 414 - 415 - 416 - 417 - 418 - 421 - 422 - 423 - 424 - 428 - 429 - 456 - 500 - 501 - 502 - 503 - 504 - 505 - 507 - 508 description: The status of the response securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http