openapi: 3.0.3
info:
  title: 'Zaple AI'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://app.zaple.ai'
paths:
  /api/v2/send-template-message:
    post:
      summary: ''
      operationId: postApiV2SendTemplateMessage
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n     \"status\": Message sent successfully.\n     \"message_id\": \"Fu17361597371857648z5541jjbgs3WUH4aeqqi\"\n}"
        400:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n     \"success\": false\n     'error' => [\n                  'code' => 'daily_limit_reached',\n                  'message' => 'You\\'ve hit your daily message limit. Please upgrade your plan to send message.',\n                ]\n}\n{\n     \"success\": false\n     'error' => [\n                  'code' => 'plan_expired',\n                  'message' => 'Your plan has expired. Please upgrade your plan to continue using the service.',\n                ]\n}\n{\n     \"success\": false\n     'error' => [\n                  'code' => 'insufficient_balance',\n                  'message' => 'You have exhausted your credits. To continue, please recharge your wallet.',\n                ]\n}"
        401:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n     \"success\": false\n     'error' => [\n                  'code' => 'unauthorized',\n                  'message' => 'Unauthorized',\n             ]\n}"
        419:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n     \"status\": error\n     \"message\": \"The template NAME_OF_THE_TEMPLATE is inactive.\"\n}\n{\n     \"status\": error\n     \"message\": \"The number is blocked. You cannot send a message.\"\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Validation errors'
                  data:
                    send_to:
                      - 'The send to field is required.'
                    template_argument1:
                      - 'The template argument1 field is required.'
                    template_argument2:
                      - 'The template argument2 field is required.'
                    template_argument3:
                      - 'The template argument3 field is required.'
                    template_argument4:
                      - 'The template argument4 field is required.'
                    template_argument5:
                      - 'The template argument5 field is required.'
                    media_url:
                      - 'The media url field is required.'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Validation errors'
                  data:
                    type: object
                    properties:
                      send_to:
                        type: array
                        example:
                          - 'The send to field is required.'
                        items:
                          type: string
                      template_argument1:
                        type: array
                        example:
                          - 'The template argument1 field is required.'
                        items:
                          type: string
                      template_argument2:
                        type: array
                        example:
                          - 'The template argument2 field is required.'
                        items:
                          type: string
                      template_argument3:
                        type: array
                        example:
                          - 'The template argument3 field is required.'
                        items:
                          type: string
                      template_argument4:
                        type: array
                        example:
                          - 'The template argument4 field is required.'
                        items:
                          type: string
                      template_argument5:
                        type: array
                        example:
                          - 'The template argument5 field is required.'
                        items:
                          type: string
                      media_url:
                        type: array
                        example:
                          - 'The media url field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Something went wrong.'
                properties:
                  message:
                    type: string
                    example: 'Something went wrong.'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                template_id:
                  type: string
                  description: 'Please provide your template name. <br>'
                  example: '475546217187442007'
                  nullable: false
                country_code:
                  type: string
                  description: 'Please provide valid country code. No need to add + before number. <br>'
                  example: '91'
                  nullable: false
                send_to:
                  type: string
                  description: 'Please provide mobile number of receiver.'
                  example: '9876543210'
                  nullable: false
                media_url_type:
                  type: string
                  description: 'If your template needs to send media, Please provide the media url type. Values can be either base64 or public_url'
                  example: 'public_url | base64'
                  nullable: false
                media_url:
                  type: url
                  description: 'If your template needs to send media files like image,document,audio,video and you dont want to provide it in base64 form then provide the valid publicly accessible URL here. <br><br> <b>Note:</b> If the provided URL is not publicly accessible or not valid as per requirement to send particular template, WhatsApp will not send the message to the recipient, and we will not receive any kind of notification regarding this. So please make sure that the given url is publicly accessible.  <br><br>'
                  example: 'https://your-remote-server-url/path-of-your-media-file'
                  nullable: false
                base64:
                  type: string
                  description: 'This is the alternative way to provide media file. If you dont want to provide the above media_url value, then provide the valid base64 string here.<br><br>'
                  example: 'data:image/jpeg;base64,/9j/4AAQSkZJRgA....'
                  nullable: false
                file_name:
                  type: optional
                  description: "If your template needs to send document file, then provide the attached file name or it will take 'Untitled' as a name."
                  example: Untitled
                  nullable: false
                tags:
                  type: optional
                  description: 'An array of tags to attach to the contact.'
                  example: '["tag1", "tag2"]'
                  nullable: false
                template_argument1:
                  type: string
                  description: 'Please provide the argument value required by specific template.'
                  example: 'Argument 1 Value'
                  nullable: false
                template_argument2:
                  type: string
                  description: 'Please provide the argument value required by specific template.'
                  example: 'Argument 2 Value'
                  nullable: false
                template_argument3:
                  type: string
                  description: 'Please provide the argument value required by specific template.'
                  example: 'Argument 3 Value'
                  nullable: false
                template_argument(N):
                  type: string
                  description: 'Please provide the argument value required by specific template.'
                  example: 'Argument(N) Value'
                  nullable: false
                header_argument:
                  type: string
                  description: 'ONLY REQUIRED if your template contains dynamic header variable'
                  example: John
                  nullable: false
              required:
                - template_id
                - country_code
                - send_to
                - template_argument1
                - template_argument2
                - template_argument3
                - template_argument(N)
                - header_argument
      security: []
  /api/v2/template-details:
    get:
      summary: ''
      operationId: getApiV2TemplateDetails
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      name: 'Order cancle'
                      template_id: '443657917386635402102430'
                      content:
                        components:
                          -
                            type: BODY
                            text: "Hi, this is to confirm we have successfully canceled your recent order {{1}}.\nThank you."
                            example:
                              body_text:
                                -
                                  - order
                          -
                            type: BUTTONS
                            buttons:
                              -
                                type: PHONE_NUMBER
                                text: 'Call Now'
                                phone_number: '+919724509724'
                        language: en_US
                        status: APPROVED
                        category: UTILITY
                      type: UTILITY
                      status: APPROVED
                      status_update_reason: NONE
                      header_type: none
                  links:
                    first: 'http://z.sr/api/v2/template-details?page=1'
                    last: 'http://z.sr/api/v2/template-details?page=10'
                    prev: null
                    next: 'http://z.sr/api/v2/template-details?page=2'
                  meta:
                    current_page: 1
                    from: 1
                    last_page: 10
                    links:
                      -
                        url: null
                        label: '&laquo; Previous'
                        active: false
                      -
                        url: 'http://z.sr/api/v2/template-details?page=1'
                        label: '1'
                        active: true
                      -
                        url: 'http://z.sr/api/v2/template-details?page=10'
                        label: '10'
                        active: false
                      -
                        url: 'http://z.sr/api/v2/template-details?page=2'
                        label: 'Next &raquo;'
                        active: false
                    path: 'http://z.sr/api/v2/template-details'
                    per_page: 10
                    to: 10
                    total: 96
                properties:
                  data:
                    type: array
                    example:
                      -
                        name: 'Order cancle'
                        template_id: '443657917386635402102430'
                        content:
                          components:
                            -
                              type: BODY
                              text: "Hi, this is to confirm we have successfully canceled your recent order {{1}}.\nThank you."
                              example:
                                body_text:
                                  -
                                    - order
                            -
                              type: BUTTONS
                              buttons:
                                -
                                  type: PHONE_NUMBER
                                  text: 'Call Now'
                                  phone_number: '+919724509724'
                          language: en_US
                          status: APPROVED
                          category: UTILITY
                        type: UTILITY
                        status: APPROVED
                        status_update_reason: NONE
                        header_type: none
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: 'Order cancle'
                        template_id:
                          type: string
                          example: '443657917386635402102430'
                        content:
                          type: object
                          properties:
                            components:
                              type: array
                              example:
                                -
                                  type: BODY
                                  text: "Hi, this is to confirm we have successfully canceled your recent order {{1}}.\nThank you."
                                  example:
                                    body_text:
                                      - [order]
                                -
                                  type: BUTTONS
                                  buttons:
                                    -
                                      type: PHONE_NUMBER
                                      text: 'Call Now'
                                      phone_number: '+919724509724'
                              items:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    example: BODY
                                  text:
                                    type: string
                                    example: "Hi, this is to confirm we have successfully canceled your recent order {{1}}.\nThank you."
                                  example:
                                    type: object
                                    properties:
                                      body_text: { type: array, example: [[order]], items: { type: array } }
                            language:
                              type: string
                              example: en_US
                            status:
                              type: string
                              example: APPROVED
                            category:
                              type: string
                              example: UTILITY
                        type:
                          type: string
                          example: UTILITY
                        status:
                          type: string
                          example: APPROVED
                        status_update_reason:
                          type: string
                          example: NONE
                        header_type:
                          type: string
                          example: none
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: 'http://z.sr/api/v2/template-details?page=1'
                      last:
                        type: string
                        example: 'http://z.sr/api/v2/template-details?page=10'
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: 'http://z.sr/api/v2/template-details?page=2'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 10
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: '&laquo; Previous'
                            active: false
                          -
                            url: 'http://z.sr/api/v2/template-details?page=1'
                            label: '1'
                            active: true
                          -
                            url: 'http://z.sr/api/v2/template-details?page=10'
                            label: '10'
                            active: false
                          -
                            url: 'http://z.sr/api/v2/template-details?page=2'
                            label: 'Next &raquo;'
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                            label:
                              type: string
                              example: '&laquo; Previous'
                            active:
                              type: boolean
                              example: false
                      path:
                        type: string
                        example: 'http://z.sr/api/v2/template-details'
                      per_page:
                        type: integer
                        example: 10
                      to:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 96
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Something went wrong.'
                properties:
                  message:
                    type: string
                    example: 'Something went wrong.'
      tags:
        - Endpoints
      security: []
  /api/v2/message-count:
    get:
      summary: ''
      operationId: getApiV2MessageCount
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  total_messages: 4767
                  sent: 3578
                  read: 2289
                properties:
                  total_messages:
                    type: integer
                    example: 4767
                  sent:
                    type: integer
                    example: 3578
                  read:
                    type: integer
                    example: 2289
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Something went wrong.'
                properties:
                  message:
                    type: string
                    example: 'Something went wrong.'
      tags:
        - Endpoints
      security: []
  /api/v2/message-status:
    get:
      summary: ''
      operationId: getApiV2MessageStatus
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n     \"sent_at\": 2024-09-05 18:53:00,\n     \"delivered_at\": 2024-09-05 18:53:12,\n     \"read_at\": 2024-09-05 18:54:24,\n     \"is_failed\": 0,\n     \"mobile_number\": 919876543210\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Validation errors'
                  data:
                    message_id:
                      - 'The message id field is required.'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Validation errors'
                  data:
                    type: object
                    properties:
                      message_id:
                        type: array
                        example:
                          - 'The message id field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Something went wrong.'
                properties:
                  message:
                    type: string
                    example: 'Something went wrong.'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                message_id:
                  type: string
                  description: 'Please provide particular message id. <br>'
                  example: 4U49782356VCFD849938PJxwzW8sSkEfEpTk
                  nullable: false
              required:
                - message_id
      security: []
  /api/v2/lists:
    post:
      summary: 'Batch Api - Create a List'
      operationId: batchApiCreateAList
      description: 'This endpoint allows you to create list to send a batch of messages'
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  list_id: 12345
                  message: 'List created successfully.'
                properties:
                  status:
                    type: boolean
                    example: true
                  list_id:
                    type: integer
                    example: 12345
                  message:
                    type: string
                    example: 'List created successfully.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  error:
                    code: duplicate_list_name
                    message: 'A list with this name already exists.'
                properties:
                  status:
                    type: boolean
                    example: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: duplicate_list_name
                      message:
                        type: string
                        example: 'A list with this name already exists.'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the list to create.'
                  example: 'Promotional Campaign List'
                  nullable: false
              required:
                - name
      security: []
  '/api/v2/messages/batch/{batch_id}/status':
    get:
      summary: 'Batch Api - Get Batch Status'
      operationId: batchApiGetBatchStatus
      description: 'This endpoint allows you to get the status of a batch. Example: batch_173693254320885494653'
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  batch_id: batch_173693254320885494653
                  status: completed
                  total_messages: 500
                  sent: 307
                  delivered: 298
                  read: 253
                  failed: 0
                properties:
                  success:
                    type: boolean
                    example: true
                  batch_id:
                    type: string
                    example: batch_173693254320885494653
                  status:
                    type: string
                    example: completed
                  total_messages:
                    type: integer
                    example: 500
                  sent:
                    type: integer
                    example: 307
                  delivered:
                    type: integer
                    example: 298
                  read:
                    type: integer
                    example: 253
                  failed:
                    type: integer
                    example: 0
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  error:
                    code: invalid_batch_id
                    message: 'The given batch id is invalid.'
                properties:
                  status:
                    type: boolean
                    example: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: invalid_batch_id
                      message:
                        type: string
                        example: 'The given batch id is invalid.'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: batch_id
        description: 'The ID of the batch.'
        example: odit
        required: true
        schema:
          type: string
  '/api/v2/messages/batch/{batch_id}/details':
    get:
      summary: 'Batch Api - Get Batch Details'
      operationId: batchApiGetBatchDetails
      description: 'Retrieve detailed information about a specific batch message'
      parameters:
        -
          in: query
          name: batch_id
          description: 'The unique identifier of the batch.'
          example: batch_17369325432094653
          required: true
          schema:
            type: string
            description: 'The unique identifier of the batch.'
            example: batch_17369325432094653
            nullable: false
        -
          in: query
          name: limit
          description: 'optional Number of messages per page. Default is 20.'
          example: 50
          required: false
          schema:
            type: integer
            description: 'optional Number of messages per page. Default is 20.'
            example: 50
            nullable: false
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  batch_id: batch_17369325432094653
                  status: completed
                  total_messages: 500
                  messages:
                    data:
                      -
                        phone_number: 911234567890
                        is_sent: 1
                        sent_at: '2024-09-05 18:53:00'
                        is_delivered: 1
                        is_failed: 0
                    links:
                      first: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details?page=1'
                      last: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details?page=90'
                      prev: null
                      next: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details?page=2'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 90
                      links:
                        -
                          url: null
                          label: '&laquo; Previous'
                          active: false
                        -
                          url: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details?page=1'
                          label: '1'
                          active: true
                      path: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details'
                      per_page: 5
                      to: 5
                      total: 446
                properties:
                  success:
                    type: boolean
                    example: true
                  batch_id:
                    type: string
                    example: batch_17369325432094653
                  status:
                    type: string
                    example: completed
                  total_messages:
                    type: integer
                    example: 500
                  messages:
                    type: object
                    properties:
                      data:
                        type: array
                        example:
                          -
                            phone_number: 911234567890
                            is_sent: 1
                            sent_at: '2024-09-05 18:53:00'
                            is_delivered: 1
                            is_failed: 0
                        items:
                          type: object
                          properties:
                            phone_number:
                              type: integer
                              example: 911234567890
                            is_sent:
                              type: integer
                              example: 1
                            sent_at:
                              type: string
                              example: '2024-09-05 18:53:00'
                            is_delivered:
                              type: integer
                              example: 1
                            is_failed:
                              type: integer
                              example: 0
                      links:
                        type: object
                        properties:
                          first:
                            type: string
                            example: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details?page=1'
                          last:
                            type: string
                            example: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details?page=90'
                          prev:
                            type: string
                            example: null
                          next:
                            type: string
                            example: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details?page=2'
                      meta:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          from:
                            type: integer
                            example: 1
                          last_page:
                            type: integer
                            example: 90
                          links:
                            type: array
                            example:
                              -
                                url: null
                                label: '&laquo; Previous'
                                active: false
                              -
                                url: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details?page=1'
                                label: '1'
                                active: true
                            items:
                              type: object
                              properties:
                                url:
                                  type: string
                                  example: null
                                label:
                                  type: string
                                  example: '&laquo; Previous'
                                active:
                                  type: boolean
                                  example: false
                          path:
                            type: string
                            example: 'https://app.zaple.ai/api/v1/messages/batch/batch_17369325432094653/details'
                          per_page:
                            type: integer
                            example: 5
                          to:
                            type: integer
                            example: 5
                          total:
                            type: integer
                            example: 446
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  error:
                    code: invalid_batch_id
                    message: 'The given batch id is invalid.'
                properties:
                  status:
                    type: boolean
                    example: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: invalid_batch_id
                      message:
                        type: string
                        example: 'The given batch id is invalid.'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: batch_id
        description: 'The ID of the batch.'
        example: aut
        required: true
        schema:
          type: string
  '/api/v2/lists/{list_id}':
    delete:
      summary: 'Batch Api - Delete a List'
      operationId: batchApiDeleteAList
      description: 'This endpoint allows you to Delete a List'
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'List deleted successfully.'
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'List deleted successfully.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  error:
                    code: deletion_not_allowed
                    message: 'This list cannot be deleted as it was not created via the API.'
                properties:
                  status:
                    type: boolean
                    example: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: deletion_not_allowed
                      message:
                        type: string
                        example: 'This list cannot be deleted as it was not created via the API.'
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: list_id
        description: 'The ID of the list.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/v2/zaple-registration:
    post:
      summary: ''
      operationId: postApiV2ZapleRegistration
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                slug:
                  type: string
                  description: ''
                  example: null
                  nullable: false
                  enum:
                    - null
                send_to:
                  type: string
                  description: 'Must be between 7 and 15 digits.'
                  example: '80344960576'
                  nullable: false
                country_code:
                  type: string
                  description: 'Must be between 1 and 5 digits.'
                  example: '28'
                  nullable: false
              required:
                - slug
                - send_to
                - country_code
      security: []
  /api/v2/catalogs:
    get:
      summary: 'Get all catalogs for authenticated user'
      operationId: getAllCatalogsForAuthenticatedUser
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The route api/v2/catalogs could not be found.'
                properties:
                  message:
                    type: string
                    example: 'The route api/v2/catalogs could not be found.'
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Create a new catalog'
      operationId: createANewCatalog
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
      security: []
  '/api/v2/catalogs/{catalog_id}/connect':
    post:
      summary: 'Connect catalog to WABA'
      operationId: connectCatalogToWABA
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: catalog_id
        description: 'The ID of the catalog.'
        example: dicta
        required: true
        schema:
          type: string
  '/api/v2/catalogs/{catalog_id}/disconnect':
    post:
      summary: 'Disconnect catalog from WABA'
      operationId: disconnectCatalogFromWABA
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: catalog_id
        description: 'The ID of the catalog.'
        example: nihil
        required: true
        schema:
          type: string
  '/api/v2/catalogs/{catalog_id}/products':
    get:
      summary: 'Get products in a catalog'
      operationId: getProductsInACatalog
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The route api/v2/catalogs/voluptatem/products could not be found.'
                properties:
                  message:
                    type: string
                    example: 'The route api/v2/catalogs/voluptatem/products could not be found.'
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Create a product in catalog'
      operationId: createAProductInCatalog
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: catalog_id
        description: 'The ID of the catalog.'
        example: voluptatem
        required: true
        schema:
          type: string
  /api/v2/commerce/settings:
    get:
      summary: 'Get commerce settings'
      operationId: getCommerceSettings
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses:
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The route api/v2/commerce/settings could not be found.'
                properties:
                  message:
                    type: string
                    example: 'The route api/v2/commerce/settings could not be found.'
      tags:
        - Endpoints
      security: []
  '/api/v2/catalogs/{catalog_id}/visibility':
    post:
      summary: 'Set catalog visibility (show/hide)'
      operationId: setCatalogVisibilityshowhide
      description: ''
      parameters:
        -
          in: header
          name: Zaple-Api-Key
          description: ''
          example: 'your zaple api key'
          schema:
            type: string
        -
          in: header
          name: Zaple-Api-Secret
          description: ''
          example: 'your zaple api secret'
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: catalog_id
        description: 'The ID of the catalog.'
        example: et
        required: true
        schema:
          type: string
tags:
  -
    name: Endpoints
    description: ''
components:
  securitySchemes:
    default:
      type: apiKey
      name: 'Zaple-Api-Key and Zaple-Api-Secret'
      in: header
      description: 'You can retrieve your api key and secret by clicking <a target="_blank" href="https://app.zaple.ai/settings/api-dev"> <b>here</b></a>.'
security:
  -
    default: []
