openapi: 3.1.0
info:
  title: Enviame API
  description: |

    ### General Concepts
      In this documentation you will find all the *endpoints* available in our API.
      To use them you will need your own __Company/Seller ID__ (id_seller) and its respective __API Key__. 
      If you are working in Marketplace mode, you will also need the Marketplace ID (marketplace_id) and use its API Key. 
      + API Keys can be found in the My Company/Seller or My Marketplace section of the Enviame platform. 
      These endpoints are configured to be used in the __stage__ testing environment, so they use the API Keys and IDs corresponding to that environment. 
      If instead they will be used against the __api__ production environment, the __stage__ subdomain must be removed from the endpoint and the apikey and Company/Seller ID corresponding to that environment must be used. 
      + __Stage:__ https://stage.api.enviame.io 
      + __Production:__ https://api.enviame.io 
      If you have questions about this documentation, write to us at support@enviame.io
  version: 2.0.0
  license:
    name: Apache 2.0
host: api.enviame.io
basePath: /v2
schemes:
  - https
produces:
  - application/json
consumes:
  - application/json
servers:
  - url: https://api.enviame.io/api
    description: Production server V2
  - url: https://stage.api.enviame.io/api
    description: Staging server
paths:
  /s2/v2/companies/{id_seller}/deliveries:
    post:
      tags:
        - Deliveries
      summary: Create delivery as seller
      operationId: Crear-Envios-Seller
      description: Endpoint that allows creating deliveries for a Company/Seller
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller API Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          schema:
            type: string
            default: application/json
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Create a new delivery
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeliveryRequest'
            examples:
              Envio_CL:
                summary: Delivery in Chile
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Orden 123
                    imported_id: '123'
                    order_price: 21990
                    weight: 1
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: bod_sell
                  shipping_destination:
                    customer:
                      name: Cliente Feliz
                      email: prueba@enviame.io
                      phone: 987654321
                    delivery_adress:
                      place: Curicó
                      full_address: Calle Falsa 123
                      information: Indicaciones adicionales
                  dimensions:
                    width: 10
                    height: 10
                    length: 10
                  carrier:
                    carrier_code: SKN
                    carrier_service: ''
                    tracking_number: ''
              Envio_MX:
                summary: Delivery in Mexico
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Camisa
                    imported_id: MX-001
                    order_price: 2390
                    weight: 10
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: CDMX-WH1
                  shipping_destination:
                    customer:
                      name: Martin Grana
                      email: logistica@pruebas.com
                      phone: 526691500000
                    delivery_address:
                      place: Condesa
                      information: Prueba
                      full_address: Av. Insurgentes Sur 123
                      zip_code: '06140'
                  dimensions:
                    width: 10
                    height: 20
                    length: 30
                  carrier:
                    carrier_code: MXIT
                    carrier_service: ''
                    tracking_number: ''
              Envio_CO:
                summary: Delivery in Colombia/Peru
                value:
                  shipping_order:
                    n_packages: 2
                    content_description: Zapatos
                    imported_id: CO-999
                    order_price: 300000
                    weight: 1.2
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: BOG-WH2
                  shipping_destination:
                    customer:
                      name: Carlos Gómez
                      email: carlos@example.com
                      phone: 3112345678
                    delivery_address:
                      place: Bogotá
                      full_address: 'Cra 7 #123-45'
                      level1: Bogotá
                  dimensions:
                    width: 15
                    height: 10
                    length: 40
                  carrier:
                    carrier_code: COIT
                    carrier_service: ''
                    tracking_number: ''
              Envio_con_Pudo:
                summary: Delivery to pickup point
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Libro
                    imported_id: PU-101
                    order_price: 100
                    weight: 0.3
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: DevCoo
                  shipping_destination:
                    customer:
                      name: Ana Torres
                      email: ana@example.com
                      phone: 998877665
                    delivery_address:
                      pickup_point_code: PUDO001
                  carrier:
                    carrier_code: COIT
                    carrier_service: ''
                    tracking_number: ''
              Envio_con_Extra_Fields:
                summary: Delivery with additional fields (extra_fields)
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Regalo
                    imported_id: EX-555
                    order_price: 500
                    weight: 1
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: WH-EXTRA
                  shipping_destination:
                    customer:
                      name: Luis Martínez
                      email: luis@example.com
                      phone: 987654321
                    delivery_address:
                      place: Miraflores
                      full_address: Av. Larco 999
                      level1: Lima
                  dimensions:
                    width: 12
                    height: 25
                    length: 30
                  carrier:
                    carrier_code: PEIT
                    carrier_service: ''
                    tracking_number: ''
                  extra_fields:
                    - name: ot
                      value: ORD-001
                    - name: comments
                      value: Entregar por la tarde
      responses:
        '200':
          description: Delivery created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryCreated'
              examples:
                Response_CL:
                  summary: Chile delivery response
                  externalValue: /api-examples/sucess-seller-cl.json
                Response_MX:
                  summary: Mexico delivery response
                  externalValue: /api-examples/sucess-seller-mx.json
                Response_CO_PE:
                  summary: Colombia/Peru delivery response
                  externalValue: /api-examples/sucess-seller-co.json
                Response_Pudo:
                  summary: Pickup point delivery response
                  externalValue: /api-examples/sucess-seller-pudo.json
                Response_extrafields:
                  summary: Delivery with additional field response (extra_fields)
                  externalValue: /api-examples/sucess-seller-extra_fields.json
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schemas-ErrorResponseEnvios401'
        '500':
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios500'
  /s2/v2/marketplaces/{marketplace_id}/companies/{id_seller}/deliveries:
    post:
      tags:
        - Deliveries
      summary: Create delivery in seller as marketplace
      operationId: Crear-Envios-MKP/Seller-V2
      description: >-
        Endpoint that allows creating deliveries in a Company/Seller associated
        with a Marketplace, using the marketplace's api-key for this purpose
      parameters:
        - name: marketplace_id
          in: path
          description: Marketplace ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Marketplace API Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
        - name: Content-Type
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Create a new delivery as MKP
        content:
          application/json:
            schema:
              type: object
              properties:
                shipping_order:
                  type: object
                  properties:
                    n_packages:
                      type: integer
                      description: Required / Number of packages
                    content_description:
                      type: string
                      description: Required / Product description
                    imported_id:
                      type: string
                      description: Reference number
                    order_price:
                      type: float
                      description: Required / Product value
                    weight:
                      type: float
                      description: Required / Weight in kilos
                    volume:
                      type: integer
                      description: >-
                        Indicate the volume in cubic meters (m³). If not sent,
                        the system will assign 1 by default.
                    type:
                      type: string
                      description: >-
                        Required / Indicates whether it is a delivery or a
                        return, in this case the default value is used
                      default: delivery
                shipping_origin:
                  type: object
                  properties:
                    warehouse_code:
                      type: integer
                      description: Required / Company/Seller alphanumeric warehouse code
                shipping_destination:
                  type: object
                  properties:
                    customer:
                      type: object
                      properties:
                        name:
                          type: string
                          description: >-
                            Required / Add the name of the person to whom the
                            product is addressed
                        email:
                          type: string
                          description: >-
                            Recipient's email required for end customer
                            notification
                        phone:
                          type: integer
                          description: Recipient's phone number
                    delivery_address:
                      type: object
                      properties:
                        place:
                          type: string
                          description: >-
                            Required / Commune (CL) - City/Municipality (CO) -
                            District (PE) - Colony (MX) - Municipality (AR)
                        full_address:
                          type: string
                          description: Required / Recipient's address
                        information:
                          type: string
                          description: Detailed information about the destination.
                        level1:
                          type: string
                          description: Province (PE) - Department (CO, AR) - State (MX)
                        level2:
                          type: string
                          description: Municipality (MX)
                        level3:
                          type: string
                          description: City (MX)
                        pickup_point_code:
                          type: integer
                          description: Pickup point code
                dimensions:
                  type: object
                  properties:
                    width:
                      type: integer
                      description: Width in centimeters
                    height:
                      type: integer
                      description: Height in centimeters
                    length:
                      type: integer
                      description: Length in centimeters
                carrier:
                  type: object
                  properties:
                    carrier_code:
                      type: string
                      description: Carrier code
                    carrier_service:
                      type: string
                      description: Carrier service type
                    tracking_number:
                      type: integer
                      description: Tracking number assigned by the carrier
                extra_fields:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        description: Attribute name
                      value:
                        type: string
                        description: Attribute value
            examples:
              Crear_Envio_Como_MKP:
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Orden 123
                    imported_id: '123'
                    order_price: 21990
                    weight: 1
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: bod_sell
                  shipping_destination:
                    customer:
                      name: Cliente Feliz
                      email: prueba@enviame.io
                      phone: 987654321
                    delivery_address:
                      place: Curicó
                      full_address: Calle Falsa 123
                      information: Indicaciones adicionales
                  dimensions:
                    width: 10
                    height: 10
                    length: 10
                  carrier:
                    carrier_code: SKN
                    carrier_service: ''
                    tracking_number: ''
              Crear_Envio_Como_MKP_Con_Destino_Pudo:
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Bufanda Rosa
                    imported_id: vx111319109
                    order_price: 13000
                    weight: 1
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: bod_sell
                  shipping_destination:
                    customer:
                      name: Cliente Feliz
                      email: prueba@enviame.io
                      phone: 987654321
                    delivery_address:
                      pickup_point_address:
                        pickup_point_code: EP0077
                  dimensions:
                    width: 10
                    height: 10
                    length: 10
                  carrier:
                    carrier_code: SKN
                    carrier_service: ''
                    tracking_number: ''
              Crear_Envio_Como_MKP_Con_Extra_Fields:
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Orden 123
                    imported_id: '123456'
                    order_price: 21990
                    weight: 1
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: DEV
                  shipping_destination:
                    customer:
                      name: Cliente Feliz
                      email: prueba@enviame.io
                      phone: 987654321
                    delivery_address:
                      place: Curicó
                      full_address: Calle Falsa 123
                      information: Indicaciones adicionales
                  dimensions:
                    width: 10
                    height: 10
                    length: 10
                  carrier:
                    carrier_code: SKN
                    carrier_service: ''
                    tracking_number: ''
                  extra_fields:
                    - name: second_reference
                      value: '5678990'
              Crear_Envio_Como_MKP_Para_Colombia_o_Peru:
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Orden 12345
                    imported_id: '1234566'
                    order_price: 1000
                    weight: 1
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: bod_col_test
                  shipping_destination:
                    customer:
                      name: Cliente Feliz
                      email: prueba@enviame.io
                      phone: 3110000000
                    delivery_address:
                      place: Bucaramanga
                      level1: Santander
                      full_address: Calle Falsa 123
                      information: Indicaciones adicionales
                  dimensions:
                    width: 10
                    height: 10
                    length: 10
                  carrier:
                    carrier_code: COO
                    carrier_service: ''
                    tracking_number: ''
              Crear_Envio_Como_MKP_Para_Mexico:
                value:
                  shipping_order:
                    n_packages: 1
                    content_description: Orden 12345
                    imported_id: '1234566'
                    order_price: 1000
                    weight: 1
                    volume: 1
                    type: delivery
                  shipping_origin:
                    warehouse_code: bod_81_CDMX
                  shipping_destination:
                    customer:
                      name: Cliente Feliz
                      email: prueba@enviame.io
                      phone: 9621340989
                    delivery_address:
                      zip_code: 54614
                      place: 5 de Febrero
                      full_address: Calle Falsa 123
                      information: Indicaciones adicionales
                  dimensions:
                    width: 10
                    height: 10
                    length: 10
                  carrier:
                    carrier_code: FDXM
                    carrier_service: ''
                    tracking_number: ''
      responses:
        '200':
          description: Delivery created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeliveryCreated'
              examples:
                Response_CL:
                  summary: MKP delivery response
                  externalValue: /api-examples/sucess-seller-cl.json
                Response_Destino_Pudo:
                  summary: Pickup point delivery response
                  externalValue: /api-examples/sucess-mkp-pudo.json
                Response_extrafields:
                  summary: Delivery with additional field response (extra_fields)
                  externalValue: /api-examples/sucess-mkp-extra_fields.json
                Response_CO_PE:
                  summary: Colombia/Peru delivery response
                  externalValue: /api-examples/sucess-mkp-co.json
                Response_MX:
                  summary: Mexico delivery response
                  externalValue: /api-examples/sucess-mkp-mx.json
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schemas-ErrorResponseEnvios401'
        '500':
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios500'
  /s2/v2/companies/{id_seller}/deliveries/{delivery_id}/transform-to-multipackage:
    put:
      tags:
        - Deliveries
      summary: Transform to multi-package from Seller
      operationId: Multi-bulto
      description: >-
        Endpoint that allows modifying the number of packages (n_packages) of a
        delivery already created with the carrier.
      parameters:
        - name: delivery_id
          in: path
          description: Delivery ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Change packages of a delivery
        content:
          application/json:
            schema:
              type: object
              properties:
                n_package:
                  type: integer
                  description: Required / Number of packages to transform
            examples:
              Transformar_a_multibulto:
                value:
                  n_package: 3
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
                  data:
                    type: object
                    properties:
                      identifier:
                        type: integer
                        description: Unique identifier of the delivery
                        example: 1812125
                      imported_id:
                        type: string
                        description: Reference number
                        example: pruebasoporte1
                      tracking_number:
                        type: string
                        description: Alphanumeric code assigned by the carrier
                        example: '259682'
                      status:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Indicates the Enviame status ID
                            example: 5
                          name:
                            type: string
                            description: Enviame status name
                            example: Listo para despacho
                          code:
                            type: string
                            description: Enviame status code
                            example: CREATED
                          info:
                            type: string
                            description: Comment assigned to the status
                            example: >-
                              Envio con tracking_number 259682 se ha reinyectado
                              en el carrier como multibulto. - 
                          created_at:
                            type: date
                            description: Date the status was assigned
                            example: '2025-03-17 09:32:45'
                      customer:
                        type: object
                        properties:
                          full_name:
                            type: string
                            description: Recipient name
                            example: Prueba Soporte
                          phone:
                            type: string
                            description: Recipient phone
                            example: null
                          email:
                            type: string
                            description: Recipient email
                            example: null
                      shipping_address:
                        type: object
                        properties:
                          full_address:
                            type: string
                            description: Full address without the commune
                            example: Calle Falsa 2345
                          place:
                            type: string
                            description: Destination commune/district/municipality
                            example: Santiago
                          type:
                            type: string
                            description: >-
                              Indicates whether it is a delivery to destination,
                              PUDO, or courier agency
                            example: home
                      country:
                        type: string
                        description: Country code
                        example: CL
                      carrier:
                        type: string
                        description: Carrier name
                        example: BLUEXPRESS
                      service:
                        type: string
                        description: Carrier service name
                        example: priority
                      label:
                        type: object
                        properties:
                          PDF:
                            type: string
                            description: Link to the label in PDF format
                            example: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.pdf
                          ZPL:
                            type: string
                            description: >-
                              Link to the label in ZPL format, if this format
                              was selected
                            example: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.zpl
                          PNG:
                            type: string
                            description: >-
                              Link to the label in PNG format, if this format
                              was selected
                            example: null
                      barcodes:
                        type: string
                        description: Barcode that some carriers allow sending
                        example: '259682'
                      deadline_at:
                        type: string
                        description: >-
                          Deadline date calculated based on carrier, service,
                          origin, and destination
                        example: No informada.
                      created_at:
                        type: string
                        description: Delivery creation date
                        example: '2025-03-17 09:26:03'
                      updated_at:
                        type: string
                        description: Delivery data update date
                        example: '2025-03-17 09:32:45'
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                            href:
                              type: string
                        example:
                          - rel: self
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1812125
                          - rel: tracking
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1812125/tracking
                          - rel: tracking-web
                            href: >-
                              https://stage.api.enviame.io/s2/companies/1402/deliveries/1812125/tracking
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios404'
  /s2/v2/deliveries/{delivery_id}:
    get:
      tags:
        - Deliveries
      summary: View delivery
      operationId: Ver-envio
      description: >-
        Endpoint that allows viewing the information of a Company/Seller
        delivery
      parameters:
        - name: delivery_id
          in: path
          description: Delivery ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          ddescription: Not modified
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
                  data:
                    type: object
                    properties:
                      identifier:
                        type: integer
                        description: Unique identifier of the delivery
                        example: 1812125
                      imported_id:
                        type: string
                        description: Reference number
                        example: pruebasoporte1
                      tracking_number:
                        type: string
                        description: Alphanumeric code assigned by the carrier
                        example: '259682'
                      status:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Indicates the Enviame status ID
                            example: 5
                          name:
                            type: string
                            description: Enviame status name
                            example: Listo para despacho
                          code:
                            type: string
                            description: Enviame status code
                            example: CREATED
                          info:
                            type: string
                            description: Comment assigned to the status
                            example: >-
                              Envio con tracking_number 259682 se ha reinyectado
                              en el carrier como multibulto. - 
                          created_at:
                            type: date
                            description: Date the status was assigned
                            example: '2025-03-17 09:32:45'
                      customer:
                        type: object
                        properties:
                          full_name:
                            type: string
                            description: Recipient name
                            example: Prueba Soporte
                          phone:
                            type: string
                            description: Recipient phone
                            example: null
                          email:
                            type: string
                            description: Recipient email
                            example: null
                      shipping_address:
                        type: object
                        properties:
                          full_address:
                            type: string
                            description: Full address without the commune
                            example: Calle Falsa 2345
                          place:
                            type: string
                            description: Destination commune/district/municipality
                            example: Santiago
                          type:
                            type: string
                            description: >-
                              Indicates whether it is a delivery to destination,
                              PUDO, or courier agency
                            example: home
                      country:
                        type: string
                        description: Country code
                        example: CL
                      carrier:
                        type: string
                        description: Carrier name
                        example: BLUEXPRESS
                      service:
                        type: string
                        description: Carrier service name
                        example: priority
                      label:
                        type: object
                        properties:
                          PDF:
                            type: string
                            description: Link to the label in PDF format
                            example: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.pdf
                          ZPL:
                            type: string
                            description: >-
                              Link to the label in ZPL format, if this format
                              was selected
                            example: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.zpl
                          PNG:
                            type: string
                            description: >-
                              Link to the label in PNG format, if this format
                              was selected
                            example: null
                      barcodes:
                        type: string
                        description: Barcode that some carriers allow sending
                        example: '259682'
                      deadline_at:
                        type: string
                        description: >-
                          Deadline date calculated based on carrier, service,
                          origin, and destination
                        example: No informada.
                      created_at:
                        type: string
                        description: Delivery creation date
                        example: '2025-03-17 09:26:03'
                      updated_at:
                        type: string
                        description: Delivery data update date
                        example: '2025-03-17 09:32:45'
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                            href:
                              type: string
                        example:
                          - rel: self
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1812125
                          - rel: tracking
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1812125/tracking
                          - rel: tracking-web
                            href: >-
                              https://stage.api.enviame.io/s2/companies/1402/deliveries/1812125/tracking
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios404verenvio'
  /s2/v2/companies/{id_seller_}/deliveries/?page={page}&limit={limit}&delivery_status_id={delivery_status_id}&date_from={date_from}&date_to={date_to}:
    get:
      tags:
        - Deliveries
      summary: View seller's deliveries
      operationId: Ver-envios-seller
      description: >-
        Endpoint that allows viewing the information of all deliveries of your
        Seller/Company/Seller. Includes additional filters to narrow down the
        list
      parameters:
        - name: id_seller_
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: delivery_status_id
          in: path
          description: Optional field - Enviame status ID
          required: false
          schema:
            type: integer
            format: int64
        - name: date_from
          in: path
          description: Optional field - Search range start date, format "YYYY-MM-DD"
          required: false
          schema:
            type: date
            format: null
        - name: date_to
          in: path
          description: Optional field - Search range end date, format "YYYY-MM-DD"
          required: false
          schema:
            type: date
            format: null
        - name: page
          in: path
          description: Optional field - Page number to query
          required: false
          schema:
            type: integer
            format: int64
        - name: limit
          in: path
          description: Optional field - Number of results per page
          required: false
          schema:
            type: int
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: integer
                        imported_id:
                          type: string
                        tracking_number:
                          type: string
                        status:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            code:
                              type: string
                            info:
                              type: string
                            created_at:
                              type: date
                        customer:
                          type: object
                          properties:
                            full_name:
                              type: string
                            phone:
                              type: string
                            email:
                              type: string
                        shipping_address:
                          type: object
                          properties:
                            full_address:
                              type: string
                            place:
                              type: string
                            type:
                              type: string
                        country:
                          type: string
                        carrier:
                          type: string
                        service:
                          type: string
                        label:
                          type: object
                          properties:
                            PDF:
                              type: string
                            ZPL:
                              type: object
                              properties:
                                raw:
                                  type: string
                                url:
                                  type: string
                            PNG:
                              type: string
                        barcodes:
                          type: string
                        deadline_at:
                          type: date
                        created_at:
                          type: date
                        updated_at:
                          type: date
                        links:
                          type: array
                          items:
                            type: object
                            properties:
                              rel:
                                type: string
                              href:
                                type: string
                    example:
                      - identifier: 1812125
                        imported_id: pruebasoporte1
                        tracking_number: '259682'
                        status:
                          id: 5
                          name: Listo para despacho
                          code: CREATED
                          info: >-
                            Envio con tracking_number 259682 se ha reinyectado
                            en el carrier como multibulto. - 
                          created_at: '2025-03-17 09:32:45'
                        customer:
                          full_name: Prueba Soporte
                          phone: null
                          email: null
                        shipping_address:
                          full_address: Calle Falsa 2345
                          place: Santiago
                          type: home
                        country: CL
                        carrier: BLUEXPRESS
                        service: priority
                        label:
                          PDF: >-
                            https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.pdf
                          ZPL:
                            raw: null
                            url: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.zpl
                          PNG: null
                        barcodes: '259682'
                        deadline_at: No informada.
                        created_at: '2025-03-17 09:26:03'
                        updated_at: '2025-03-17 09:32:45'
                        links:
                          - rel: self
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1812125
                          - rel: tracking
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1812125/tracking
                          - rel: tracking-web
                            href: >-
                              https://stage.api.enviame.io/s2/companies/1402/deliveries/1812125/tracking
                      - identifier: 1797285
                        imported_id: '19134'
                        tracking_number: '245619'
                        status:
                          id: 5
                          name: Listo para despacho
                          code: CREATED
                          info: 'Ya creamos tu envío en: STARKEN  - '
                          created_at: '2024-10-28 13:18:29'
                        customer:
                          full_name: Daniela karina Fuentes perez
                          phone: '966847822'
                          email: danielakrt@gmail.com
                        shipping_address:
                          full_address: TENIENTE MERINO CON HUAQUEN 881
                          place: La Ligua
                          type: home
                        country: CL
                        carrier: STARKEN
                        service: normal
                        label:
                          PDF: >-
                            https://storage.googleapis.com/dev-carrier-labels/202410/1797285/245619-label.pdf
                          ZPL:
                            raw: null
                            url: >-
                              https://storage.googleapis.com/dev-carrier-labels/202410/1797285/245619-label.zpl
                          PNG: null
                        barcodes: '245619'
                        deadline_at: No informada.
                        created_at: '2024-10-28 13:17:10'
                        updated_at: '2024-10-28 13:18:29'
                        links:
                          - rel: self
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1797285
                          - rel: tracking
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1797285/tracking
                          - rel: tracking-web
                            href: >-
                              https://stage.api.enviame.io/s2/companies/1402/deliveries/1797285/tracking
                      - identifier: 1780508
                        imported_id: '848'
                        tracking_number: No informado
                        status:
                          id: 4
                          name: Rechazado por Carrier
                          code: PENDING
                          info: 'Envio rechazado por carrier - '
                          created_at: '2024-05-29 16:35:54'
                        customer:
                          full_name: Matías Alarcón
                          phone: '940286302'
                          email: matiasyanezalarcon@gmail.com
                        shipping_address:
                          full_address: Arlegui 469 Oficina 15
                          place: Algarrobo
                          type: home
                        country: CL
                        carrier: STARKEN
                        service: normal
                        label:
                          PDF: null
                          ZPL:
                            raw: null
                            url: null
                          PNG: null
                        barcodes: null
                        deadline_at: No informada.
                        created_at: '2024-04-25 09:34:13'
                        updated_at: '2024-05-29 15:35:54'
                        links:
                          - rel: self
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1780508
                          - rel: tracking
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1780508/tracking
                          - rel: tracking-web
                            href: >-
                              https://stage.api.enviame.io/s2/companies/1402/deliveries/1780508/tracking
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total_pages:
                            type: integer
                            example: 10
                          total:
                            type: integer
                            example: 30
                          per_page:
                            type: integer
                            example: 3
                          current_page:
                            type: integer
                            example: 1
                          count:
                            type: integer
                            example: 3
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios404verenvio'
  /s2/v2/companies/{id_seller}/labels:
    post:
      tags:
        - Deliveries
      summary: Print label and add to manifest
      operationId: Imprimir-etiqueta-agregar-manifiesto
      description: >-
        Endpoint that allows generating the label for one or more deliveries in
        Ready for dispatch status (ID 5), setting them to Ready for dispatch -
        printed status (ID 26) and assigning them to a manifest.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Print label and add to manifest
        content:
          application/json:
            schema:
              type: object
              properties:
                deliveries:
                  type: array
                  description: Required / Delivery IDs to generate label.
                  items:
                    type: string
                    example: 1812125
                type:
                  type: string
                  description: 'Required / Label format type (PDF) '
                  example: pdf
                labelsPerPage:
                  type: int
                  description: Required / Number of labels per page.
                  example: 1
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
                  data:
                    type: object
                    properties:
                      carrier:
                        type: string
                        description: Carrier to which the printed deliveries belong
                        example: BLUEXPRESS
                      url:
                        type: string
                        description: URL with the labels in the chosen format
                        example: >-
                          https://storage.googleapis.com/hs-carrier-deliveries/202503/1402/blx_20250317_17_22_49_359470634.pdf
                      labels:
                        type: string
                        description: URL with the labels in the chosen format
                        example: >-
                          https://storage.googleapis.com/hs-carrier-deliveries/202503/1402/blx_20250317_17_22_49_359470634.pdf
                      summary:
                        type: string
                        description: >-
                          URL with the temporary manifest containing the data of
                          the printed deliveries in this operation
                        example: >-
                          https://storage.googleapis.com/hs-carrier-deliveries/202503/1402/dev_20250317_658779_2706.pdf
                      summary_id:
                        type: integer
                        description: Temporary manifest ID
                        example: 2706
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred
  /s2/v2/deliveries/{delivery_id}/tracking:
    get:
      tags:
        - Deliveries
      summary: View delivery tracking
      operationId: Ver-tracking-envio
      description: >-
        Endpoint that allows viewing the status history of a Company/Seller
        delivery.
      parameters:
        - name: delivery_id
          in: path
          description: Delivery ID, generated by Enviame o referencia
          required: true
          schema:
            type: integer
            format: int64
        - name: all_matches
          in: query
          description: >-
            This parameter can be used to search by a reference that is not the
            delivery ID, and a list of deliveries matching the provided
            reference will be returned.
          required: false
          schema:
            type: boolean
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      identifier:
                        type: integer
                        description: Unique identifier of the delivery
                        example: 1812125
                      imported_id:
                        type: string
                        description: Reference number
                        example: pruebasoporte1
                      tracking_number:
                        type: string
                        description: Alphanumeric code assigned by the carrier
                        example: '259682'
                      status:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Indicates the Enviame status ID
                            example: 26
                          name:
                            type: string
                            description: Enviame status name
                            example: Listo para despacho - Impreso
                          code:
                            type: string
                            description: Enviame status code
                            example: CREATED
                          info:
                            type: string
                            description: Comment assigned to the status
                            example: Etiqueta impresa
                          created_at:
                            type: date
                            description: Date the status was assigned
                            example: '2025-03-17 17:22:51'
                      customer:
                        type: object
                        properties:
                          full_name:
                            type: string
                            description: Recipient name
                            example: Prueba Soporte
                          phone:
                            type: string
                            description: Recipient phone
                            example: null
                          email:
                            type: string
                            description: Recipient email
                            example: null
                      shipping_address:
                        type: object
                        properties:
                          full_address:
                            type: string
                            description: Full address without the commune
                            example: Calle Falsa 2345
                          place:
                            type: string
                            description: Destination commune/district/municipality
                            example: Santiago
                          type:
                            type: string
                            description: >-
                              Indicates whether it is a delivery to destination,
                              PUDO, or courier agency
                            example: home
                      country:
                        type: string
                        description: Country code
                        example: CL
                      carrier:
                        type: string
                        description: Carrier name
                        example: BLUEXPRESS
                      service:
                        type: string
                        description: Carrier service name
                        example: priority
                      label:
                        type: object
                        properties:
                          PDF:
                            type: string
                            description: Link to the label in PDF format
                            example: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.pdf
                          ZPL:
                            type: string
                            description: >-
                              Link to the label in ZPL format, if this format
                              was selected
                            example: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.zpl
                          PNG:
                            type: string
                            description: >-
                              Link to the label in PNG format, if this format
                              was selected
                            example: null
                      barcodes:
                        type: string
                        description: Barcode that some carriers allow sending
                        example: '259682'
                      tracking:
                        type: array
                        items:
                          type: object
                          properties:
                            status_id:
                              type: integer
                            code:
                              type: string
                            name:
                              type: string
                            comment:
                              type: string
                            created_at:
                              type: date
                        example:
                          - status_id: 26
                            code: CREATED
                            name: Listo para despacho - Impreso
                            comment: Etiqueta impresa
                            created_at: '2025-03-17 17:22:51'
                          - status_id: 5
                            code: CREATED
                            name: Listo para despacho
                            comment: >-
                              Envio con tracking_number 259682 se ha reinyectado
                              en el carrier como multibulto.
                            created_at: '2025-03-17 09:32:45'
                          - status_id: 5
                            code: CREATED
                            name: Listo para despacho
                            comment: 'Ya creamos tu envío en: BLUEXPRESS '
                            created_at: '2025-03-17 09:26:12'
                          - status_id: 1
                            code: PENDING
                            name: Creado
                            comment: Envio creado por api
                            created_at: '2025-03-17 09:26:04'
                      deadline_at:
                        type: string
                        description: >-
                          Deadline date calculated based on carrier, service,
                          origin, and destination
                        example: No informada.
                      created_at:
                        type: string
                        description: Delivery creation date
                        example: '2025-03-17 09:26:03'
                      updated_at:
                        type: string
                        description: Delivery data update date
                        example: '2025-03-17 09:32:45'
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios404verenvio'
  /s2/v2/companies/{id_seller}/summaries-new-endpoint:
    get:
      tags:
        - Deliveries
      summary: List manifests
      operationId: Listar-manifiestos-new-endpoint
      description: Endpoint that allows listing the manifests of a Company/Seller.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
        - name: status_code[]
          in: query
          description: >-
            Optional field / Filters by one or more manifest status codes.
            Available values according to the manifest service.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - OPEN
                - CLOSED
                - CONFIRMED
          style: form
          explode: true
        - name: with[]
          in: query
          description: >-
            Optional field / Allows including additional relationships in the
            response.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - deliveries
          style: form
          explode: true
        - name: created_at_from
          in: query
          description: Optional field / Manifest creation start date.
          required: false
          schema:
            type: string
            format: date-time
        - name: created_at_to
          in: query
          description: Optional field / Manifest creation end date.
          required: false
          schema:
            type: string
            format: date-time
        - name: updated_at_to
          in: query
          description: Optional field / Manifest update end date.
          required: false
          schema:
            type: string
            format: date-time
        - name: group_code
          in: query
          description: Optional field / Manifest grouping code.
          required: false
          schema:
            type: string
        - name: carrier_code
          in: query
          description: Optional field / Carrier code.
          required: false
          schema:
            type: string
        - name: organization_id
          in: query
          description: Optional field / Associated organization ID.
          required: false
          schema:
            type: integer
        - name: pudo_id
          in: query
          description: Optional field / Associated PUDO point ID.
          required: false
          schema:
            type: integer
        - name: creator_email
          in: query
          description: Optional field / Manifest creator user email.
          required: false
          schema:
            type: string
            format: email
        - name: summary_origin
          in: query
          description: Optional field / Manifest creation origin.
          required: false
          schema:
            type: string
        - name: sort_by
          in: query
          description: Optional field / Sorting criteria in JSON format.
          required: false
          schema:
            type: string
          example: '[{"field":"updated_at","order":"desc"}]'
        - name: without_deliveries_in_movement
          in: query
          description: Optional field / Excludes manifests with deliveries in transit.
          required: false
          schema:
            type: boolean
        - name: delivery_ids[]
          in: query
          description: Optional field / Delivery IDs to filter manifests.
          required: false
          schema:
            type: array
            items:
              type: integer
          style: form
          explode: true
        - name: page
          in: query
          description: Optional field / Page number.
          required: false
          schema:
            type: integer
            minimum: 1
        - name: limit
          in: query
          description: Optional field / Number of records per page.
          required: false
          schema:
            type: integer
            minimum: 1
        - name: timezone
          in: query
          description: Optional field / Timezone for formatting dates.
          required: false
          schema:
            type: string
            default: etc/utc
        - name: services[]
          in: query
          description: Optional field / Carrier services to filter manifests.
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummaryNewEndpointResponse'
              example:
                status: success
                data:
                  - id: 3263320
                    shipper:
                      id: 0
                      name: Example Shipper
                      code: example_shipper
                      country:
                        id: 1
                        code: CL
                        name: Chile
                    organization:
                      id: 0
                      name: Example Organization
                      code: example_organization
                      country:
                        id: 1
                        code: CL
                        name: Chile
                    carrier_code: SKN
                    deliveries:
                      - 455258308
                      - 455258356
                      - 455258485
                      - 455258535
                      - 455258621
                      - 455258828
                    warehouse:
                      id: 0
                      name: Example Warehouse
                      code: example_warehouse
                    status:
                      id: 2
                      code: CLOSED
                      name: Cerrado
                    group_code: 000000_000_SKN_000000_STANDARD
                    files: null
                    labels_url: >-
                      https://storage.googleapis.com/hs-carrier-deliveries-prod/000000/000/example_label_000.pdf
                    summary_url: >-
                      https://storage.googleapis.com/hs-carrier-deliveries-prod/000000/000/example_summary_000.pdf
                    creator_user: example@example.com
                    created_at: '2026-05-25T17:43:33.000Z'
                    updated_at: '2026-05-25T17:44:41.000Z'
                    deleted_at: null
                    created_at_format: 25-05-2026 17:43
                    updated_at_format: 25-05-2026 17:44
                    services:
                      - normal
                    files_statuses:
                      labels:
                        url: >-
                          https://storage.googleapis.com/hs-carrier-deliveries-prod/000000/000/example_label_000.pdf
                        status: done
                        date: '2026-05-25 17:44:43'
                        error: null
                      summary:
                        url: >-
                          https://storage.googleapis.com/hs-carrier-deliveries-prod/000000/000/example_summary_000.pdf
                        status: done
                        date: '2026-05-25 17:44:43'
                        error: null
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred
  /s2/v2/companies/{id_seller}/summaries-new-endpoint/{summary_id}:
    get:
      tags:
        - Deliveries
      summary: View manifest
      operationId: Ver-manifiesto-new-endpoint
      description: Endpoint that allows querying a manifest of a Company/Seller.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame.
          required: true
          schema:
            type: integer
            format: int64
        - name: summary_id
          in: path
          description: Manifest ID, generated by Enviame.
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SummaryNewEndpointDetailResponse'
              example:
                status: success
                data:
                  id: 3263320
                  shipper:
                    id: 0
                    name: Example Shipper
                    code: example_shipper
                    country:
                      id: 1
                      code: CL
                      name: Chile
                  organization:
                    id: 0
                    name: Example Organization
                    code: example_organization
                    country:
                      id: 1
                      code: CL
                      name: Chile
                  carrier_code: SKN
                  deliveries:
                    - 455258308
                    - 455258356
                    - 455258485
                    - 455258535
                    - 455258621
                    - 455258828
                  warehouse:
                    id: 0
                    name: Example Warehouse
                    code: example_warehouse
                  status:
                    id: 2
                    code: CLOSED
                    name: Cerrado
                  group_code: 000000_000_SKN_000000_STANDARD
                  files: null
                  labels_url: >-
                    https://storage.googleapis.com/hs-carrier-deliveries-prod/000000/000/example_label_000.pdf
                  summary_url: >-
                    https://storage.googleapis.com/hs-carrier-deliveries-prod/000000/000/example_summary_000.pdf
                  creator_user: example@example.com
                  created_at: '2026-05-25T17:43:33.000Z'
                  updated_at: '2026-05-25T17:44:41.000Z'
                  deleted_at: null
                  created_at_format: 25-05-2026 17:43
                  updated_at_format: 25-05-2026 17:44
                  services:
                    - normal
                  files_statuses:
                    labels:
                      url: >-
                        https://storage.googleapis.com/hs-carrier-deliveries-prod/000000/000/example_label_000.pdf
                      status: done
                      date: '2026-05-25 17:44:43'
                      error: null
                    summary:
                      url: >-
                        https://storage.googleapis.com/hs-carrier-deliveries-prod/000000/000/example_summary_000.pdf
                      status: done
                      date: '2026-05-25 17:44:43'
                      error: null
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: Summary not found.
        '500':
          description: An error occurred
  /s2/v2/companies/{id_seller}/summary:
    post:
      tags:
        - Deliveries
      summary: Generate a manifest
      operationId: Generar-manifiesto
      description: >-
        Endpoint that allows generating a manifest for a Company/Seller, with
        deliveries from the same carrier and source warehouse.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Create a manifest
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deliveries:
                  type: array
                  description: Required / Delivery IDs to generate the manifest.
                  items:
                    type: string
                    example: 1812125
                custom:
                  type: boolean
                  description: >-
                    Optional / Indicates whether the manifest should be
                    generated based on Marketcenter
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      carrier:
                        type: string
                        description: Carrier to which the printed deliveries belong
                        example: BLUEXPRESS
                      url:
                        type: string
                        description: URL with the labels in PDF format
                        example: >-
                          https://storage.googleapis.com/hs-carrier-deliveries/202503/1402/blx_20250317_17_22_49_359470634.pdf
                      labels:
                        type: string
                        description: URL with the labels in the chosen format
                        example: >-
                          https://storage.googleapis.com/hs-carrier-deliveries/202503/1402/blx_20250317_17_22_49_359470634.pdf
                      summary:
                        type: string
                        description: URL with the final manifest
                        example: >-
                          https://storage.googleapis.com/hs-carrier-deliveries/202503/1402/dev_20250317_658779_2706.pdf
                      summary_id:
                        type: integer
                        description: Manifest ID
                        example: 2706
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred
  /s2/v2/companies/{id_seller}/summaries/{id_manifiesto}/close:
    put:
      tags:
        - Deliveries
      summary: Close manifest
      operationId: Cerrar manifiesto
      description: >-
        Endpoint that allows closing a manifest, preventing more deliveries from
        being added to it.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: id_manifiesto
          in: path
          description: Manifest ID, generado by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                close_type:
                  type: string
                  nullable: true
                  description: >-
                    Optional / Manifest close type:

                    - `CLOSE_ANYWAY`: closes the manifest including deliveries
                    in transit.

                    - `CLOSE_ONE`: splits deliveries into two manifests; the
                    original manifest keeps only deliveries in transit and is
                    closed, while a new open manifest is created with non-moving
                    deliveries.

                    - `CLOSE_BOTH`: applies the same split as `CLOSE_ONE`, but
                    also closes the new manifest created with non-moving
                    deliveries.
                  enum:
                    - CLOSE_ANYWAY
                    - CLOSE_ONE
                    - CLOSE_BOTH
                async:
                  type: boolean
                  default: false
                  description: >-
                    Optional / Defines whether file generation is processed
                    asynchronously. 


                    - `false`: waits for the label strip and PDF manifest to be
                    generated before responding.

                    - `true`: generates files in the background and the
                    `labels_url` and `summary_url` property URLs will be
                    returned as `null`.


                    **It is recommended** to use this parameter as `true` if the
                    manifest has a considerable number of deliveries or if you
                    don't need 

                    any of the files immediately, as this way the endpoint will
                    respond faster.
            example:
              close_type: CLOSE_ANYWAY
              async: false
      responses:
        '200':
          description: Manifest closed successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Unique manifest ID
                        example: 2706
                      company_id:
                        type: integer
                        description: Company/Seller ID
                        example: 1402
                      carrier_id:
                        type: integer
                        description: Internal ID assigned to the carrier by Envíame
                        example: 31
                      warehouse_id:
                        type: integer
                        description: >-
                          Unique internal ID of the warehouse assigned to the
                          manifest
                        example: 2757
                      delivery_label_print_status_id:
                        type: integer
                        description: >-
                          Manifest status, which can be:  - 1) Open  - 2) Closed
                          - 3) Confirmed
                        example: 2
                      description:
                        type: string
                        description: Internal grouping code of the manifest
                        example: 202503170522_1402_2757_31_SERpriority_express
                      type:
                        type: integer
                        description: Manifest print type
                        example: 1
                      deliveries:
                        type: array
                        description: List of deliveries added to the manifest
                        items:
                          type: string
                          example: 1812125
                      carrier_services:
                        type: array
                        description: Carrier services present in the manifest
                        items:
                          type: string
                        example:
                          - priority
                      labels_url:
                        type: string
                        description: URL with the labels added to this manifest
                        example: >-
                          https://storage.googleapis.com/hs-carrier-deliveries/202503/1402/blx_20250318_09_41_42_1506856707.pdf
                      summary_url:
                        type: string
                        description: URL with the manifest generated in PDF
                        example: >-
                          https://storage.googleapis.com/hs-carrier-deliveries/202503/1402/dev_20250318_658784_2706.pdf
                      active:
                        type: boolean
                        description: >-
                          Indicates whether the manifest is active or closed to
                          receive more deliveries
                        example: false
                      voucher:
                        type: array
                        nullable: true
                        description: >-
                          Confirmation files associated with the manifest, or
                          null if none exist
                        items:
                          type: object
                        example: null
                      has_voucher:
                        type: boolean
                        description: Indicates whether the manifest has confirmation files
                        example: false
                      extra_fields:
                        type: object
                        nullable: true
                        description: Additional manifest fields
                        example: null
                      deleted_at:
                        type: date
                        description: Manifest deletion date
                        example: null
                      created_at:
                        type: date
                        description: Manifest creation date
                        example: '2025-03-17 17:22:46'
                      updated_at:
                        type: date
                        description: Manifest last update date
                        example: '2025-03-18 09:41:44'
                      closed_at:
                        type: string
                        nullable: true
                        description: Manifest close date
                        example: '2025-03-18 09:41:44'
                      creator_email:
                        type: string
                        description: Email of the user who created this manifest
                        example: null
                      summary_origin:
                        type: string
                        description: Indicates how this manifest was created
                        example: api
                      countDeliveries:
                        type: integer
                        description: Indicates the number of deliveries in the manifest
                        example: 1
                      action_code:
                        type: string
                        nullable: true
                        description: >-
                          Close action returned by the manifest service when
                          applicable
                        example: CLOSE_ANYWAY
                      new_summary:
                        type: object
                        nullable: true
                        description: >-
                          Additional manifest returned by the manifest service
                          when the close type generates one
        '400':
          description: Bad Request. The manifest is not open or the close type is invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    example: The manifest is not open
                  code:
                    type: integer
                    example: 400
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: Not Found. The manifest or the company does not exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    example: Manifest not found
                  code:
                    type: integer
                    example: 404
        '500':
          description: Internal Server Error. Unexpected error closing the manifest.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    example: An unexpected error occurred. Contact support
                  code:
                    type: integer
                    example: 500
  /s2/v2/companies/{id_seller}/deliveries/{delivery_id}:
    delete:
      tags:
        - Deliveries
      summary: Delete delivery
      operationId: Eliminar_envío
      description: >-
        Endpoint that allows deleting deliveries by assigning them the Deleted
        status (ID 12)
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: delivery_id
          in: path
          description: Delivery ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    description: Indicates whether the delivery was deleted or not
                    example: El envío se ha eliminado correctamente
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios404verenvio'
  /s2/v2/deliveries/{delivery_id}/statuses:
    put:
      tags:
        - Deliveries
      summary: Update status of an internal transport delivery
      operationId: Actualizar estado de un envío de transporte interno
      description: >-
        Endpoint to update the status of deliveries belonging to the Internal
        Transport operator
      parameters:
        - name: delivery_id
          in: path
          description: Delivery ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Company/Seller Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Change delivery status
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: Required / Status ID to apply to the delivery
                  example: 7
                comment:
                  type: string
                  description: Optional / Comment to be added to the status update record.
                  example: Status change made for testing
                changed_at:
                  type: string
                  description: >-
                    Optional / Date that will be recorded as the status update
                    date
                  example: '2025-03-18 10:00:00'
      responses:
        '200':
          description: completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      identifier:
                        type: integer
                        description: Unique identifier of the delivery
                        example: 1812125
                      imported_id:
                        type: string
                        description: Reference number
                        example: pruebasoporte1
                      tracking_number:
                        type: string
                        description: Alphanumeric code assigned by the carrier
                        example: '259682'
                      status:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Indicates the Enviame status ID
                            example: 7
                          name:
                            type: string
                            description: Enviame status name
                            example: En tránsito
                          code:
                            type: string
                            description: Enviame status code
                            example: IN_TRANSIT
                          info:
                            type: string
                            description: Comment assigned to the status
                            example: 'Status change made for testing - '
                          created_at:
                            type: date
                            description: Date the status was assigned
                            example: '2025-03-18 10:00:00'
                      customer:
                        type: object
                        properties:
                          full_name:
                            type: string
                            description: Recipient name
                            example: Prueba Soporte
                          phone:
                            type: string
                            description: Recipient phone
                            example: null
                          email:
                            type: string
                            description: Recipient email
                            example: null
                      shipping_address:
                        type: object
                        properties:
                          full_address:
                            type: string
                            description: Full address without the commune
                            example: Calle Falsa 2345
                          place:
                            type: string
                            description: Destination commune/district/municipality
                            example: Santiago
                          type:
                            type: string
                            description: >-
                              Indicates whether it is a delivery to destination,
                              PUDO, or courier agency
                            example: home
                      country:
                        type: string
                        description: Country code
                        example: CL
                      carrier:
                        type: string
                        description: Carrier name
                        example: BLUEXPRESS
                      service:
                        type: string
                        description: Carrier service name
                        example: priority
                      label:
                        type: object
                        properties:
                          PDF:
                            type: string
                            description: Link to the label in PDF format
                            example: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.pdf
                          ZPL:
                            type: string
                            description: >-
                              Link to the label in ZPL format, if this format
                              was selected
                            example: >-
                              https://storage.googleapis.com/dev-carrier-labels/202503/1812125/259682-label.zpl
                          PNG:
                            type: string
                            description: >-
                              Link to the label in PNG format, if this format
                              was selected
                            example: null
                      barcodes:
                        type: string
                        description: Barcode that some carriers allow sending
                        example: '259682'
                      deadline_at:
                        type: string
                        description: >-
                          Deadline date calculated based on carrier, service,
                          origin, and destination
                        example: No informada.
                      created_at:
                        type: string
                        description: Delivery creation date
                        example: '2025-03-17 09:26:03'
                      updated_at:
                        type: string
                        description: Delivery data update date
                        example: '2025-03-17 09:32:45'
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                            href:
                              type: string
                        example:
                          - rel: self
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1812125
                          - rel: tracking
                            href: >-
                              https://stage.api.enviame.io/api/s2/v2/deliveries/1812125/tracking
                          - rel: tracking-web
                            href: >-
                              https://stage.api.enviame.io/s2/companies/1402/deliveries/1812125/tracking
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred
  /s1/v1/companies/{id_seller}/warehouses:
    post:
      tags:
        - Company/Seller
      summary: Create Company/Seller Warehouse
      operationId: Crear-Bodega-Company/Seller-v2
      description: >-
        Endpoint that allows creating warehouses for a Company/Seller. At least
        one warehouse must be created in order to generate deliveries."
      parameters:
        - name: id_seller
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          required: true
          description: Company/Seller Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
        - name: Content-Type
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Required / Warehouse name
                code:
                  type: string
                  description: Required / Alphanumeric code of the warehouse
                place:
                  type: string
                  description: >-
                    Required / Commune (CL) - City/Municipality (CO) - District
                    (PE) - Neighborhood (MX) - Municipality (AR) where the
                    warehouse is located
                full_address:
                  type: string
                  description: Required / Full address of the warehouse, excluding commune
                information:
                  type: string
                  description: Additional information or address complement
                contact_name:
                  type: string
                  description: Warehouse contact name
                contact_phone:
                  type: string
                  description: Contact phone number
                contact_email:
                  type: string
                  description: Contact email
            example:
              value:
                name: Bodega Prueba Docu
                code: bod_prueba_docu
                place: Cerrillos
                full_address: Avenida Siempreviva 987
                information: Bodega B5
                contact_name: Cosme Fulanito
                contact_phone: 998769876
                contact_email: bodega-prueba@enviame.io
      responses:
        '201':
          description: Warehouse successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Successful request result
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Warehouse internal ID
                        example: 18030
                      marketplace_creator:
                        type: string
                        description: ID of the seller who owns the warehouse
                        example: 1402
                      marketplace_exclusive:
                        type: boolean
                        description: ''
                        example: false
                      is_active:
                        type: boolean
                        description: Indicates whether the warehouse is active or inactive
                        example: true
                      name:
                        type: string
                        description: Warehouse name
                        example: Bodega Prueba Docu
                      code:
                        type: string
                        description: Alphanumeric code of the warehouse
                        example: bod_prueba_docu
                      contact_name:
                        type: string
                        description: Warehouse contact name
                        example: Cosme Fulanito
                      contact_phone:
                        type: string
                        description: Contact phone number
                        example: 998769876
                      contact_email:
                        type: string
                        description: Contact email
                        example: bodega-prueba@enviame.io
                      address:
                        type: object
                        properties:
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Cerrillos
                          place_id:
                            type: integer
                            description: Internal ID asignado al place
                            example: 105
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: Avenida Siempreviva 987
                          information:
                            type: string
                            description: Additional information or address complement
                            example: Bodega B5
                          zip_code:
                            type: string
                            description: Postal code assigned to the place
                            example: null
                          latitude:
                            type: string
                            description: Latitude coordinates of the warehouse location
                            example: null
                          longitude:
                            type: string
                            description: Longitude coordinates of the warehouse location
                            example: null
                      created_at:
                        type: string
                        description: Warehouse creation date
                        example: '2025-03-18 14:32:54'
                      updated_at:
                        type: string
                        description: Warehouse data update date
                        example: '2025-03-18 14:32:54'
                      deleted_at:
                        type: string
                        description: Warehouse deletion date
                        example: null
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              example: self
                            href:
                              type: string
                              example: >-
                                https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/18030
                  errors:
                    type: string
                    description: creation errors
                    example: []
        '500':
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s1/v1/companies/{id_seller}:
    get:
      tags:
        - Company/Seller
      summary: View Company/Seller
      operationId: Ver-Company/Seller-v2
      description: Endpoint that allows viewing the information of a Company/Seller
      parameters:
        - name: id_seller
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          required: true
          description: Company/Seller Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: Successful query.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Company/Seller ID, generated by Enviame
                        example: 1402
                      name:
                        type: string
                        description: Company/Seller name
                        example: capsula
                      corporate_name:
                        type: string
                        description: Corporate name / Legal name
                        example: capsule corp
                      dni:
                        type: string
                        description: Company/Seller RUT (DNI)
                        example: 199875629
                      website:
                        type: string
                        description: Company/Seller website
                        example: null
                      activated:
                        type: integer
                        description: >-
                          Indicates whether the Company/Seller is active (1) or
                          inactive (0)
                        example: 1
                      logo:
                        type: string
                        description: >-
                          Internal URL with the path to the Company/Seller logo,
                          if uploaded
                        example: null
                      code:
                        type: string
                        description: Alphanumeric code of the Company/Seller
                        example: capsula
                      country:
                        type: string
                        description: Company/Seller country code
                        example: CL
                      rule:
                        type: integer
                        description: Currently unused, it indicated the assigned rule
                        example: null
                      created_at:
                        type: string
                        description: Company/Seller creation date
                        example: '2021-06-21 18:32:57'
                      updated_at:
                        type: string
                        description: Company/Seller last data update date
                        example: '2023-06-27 18:03:28'
                      deleted_at:
                        type: string
                        description: Company/Seller deletion date
                        example: null
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              description: Relationship of the link to the resource.
                            href:
                              type: string
                              description: Resource URL.
                        example:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/1402
                          - rel: companies.employees
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/1402/employees
                          - rel: companies.warehouses
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/1402/warehouses
                          - rel: companies.carriers
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/1402/carriers
                  errors:
                    type: string
                    description: creation errors
                    example: []
        '500':
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s1/v1/companies/{id_seller}/warehouses/{warehouse_code}:
    put:
      tags:
        - Company/Seller
      summary: Edit Seller/Company/Seller warehouse
      operationId: Editar-bodega-de-un-Seller/Company/Seller-v2
      description: >-
        Endpoint that allows editing an existing warehouse assigned to a
        Company/Seller.
      parameters:
        - name: id_seller
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: warehouse_code
          in: path
          required: true
          description: Alphanumeric code of the warehouse
          schema:
            type: string
        - name: api-key
          in: header
          required: true
          description: Company/Seller Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Warehouse name
                  example: Bodega Prueba Docu
                place:
                  type: string
                  description: >-
                    Required / Commune (CL) - City/Municipality (CO) - District
                    (PE) - Neighborhood (MX) - Municipality (AR) where the
                    warehouse is located
                  example: Cerrillos
                full_address:
                  type: string
                  description: Warehouse address, excluding commune
                  example: Avenida Siempreviva 9870
      responses:
        '200':
          description: Warehouse edited and changes saved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: 'Indicates the operation status. '
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Warehouse internal ID
                        example: 18030
                      marketplace_creator:
                        type: string
                        description: ID of the seller who owns the warehouse
                        example: 1402
                      marketplace_exclusive:
                        type: boolean
                        description: ''
                        example: false
                      is_active:
                        type: boolean
                        description: Indicates whether the warehouse is active or inactive
                        example: true
                      name:
                        type: string
                        description: Warehouse name
                        example: Bodega Prueba Docu
                      code:
                        type: string
                        description: Alphanumeric code of the warehouse
                        example: bod_prueba_docu
                      contact_name:
                        type: string
                        description: Warehouse contact name
                        example: Cosme Fulanito
                      contact_phone:
                        type: string
                        description: Contact phone number
                        example: 998769876
                      contact_email:
                        type: string
                        description: Contact email
                        example: bodega-prueba@enviame.io
                      address:
                        type: object
                        properties:
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Cerrillos
                          place_id:
                            type: integer
                            description: Internal ID asignado al place
                            example: 105
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: Avenida Siempreviva 9870
                          information:
                            type: string
                            description: Additional information or address complement
                            example: Bodega B5
                          zip_code:
                            type: string
                            description: Postal code assigned to the place
                            example: null
                          latitude:
                            type: string
                            description: Latitude coordinates of the warehouse location
                            example: null
                          longitude:
                            type: string
                            description: Longitude coordinates of the warehouse location
                            example: null
                      created_at:
                        type: string
                        description: Warehouse creation date
                        example: '2025-03-18 14:32:54'
                      updated_at:
                        type: string
                        description: Warehouse data update date
                        example: '2025-03-18 14:32:54'
                      deleted_at:
                        type: string
                        description: Warehouse deletion date
                        example: null
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              example: self
                            href:
                              type: string
                              example: >-
                                https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/18030
                  errors:
                    type: string
                    description: creation errors
                    example: []
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    description: error type
                    example: Unauthorized.
                  code:
                    type: string
                    description: error code.
                    example: 401
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s1/v1/companies/{id_seller}/employees:
    get:
      tags:
        - Company/Seller
      summary: List Company/Seller Employees/Users
      operationId: Listar-Empleados/Usuarios-Company/Seller-seller-v2
      description: Endpoint to list users created as employees of a Company/Seller
      parameters:
        - name: id_seller
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          required: true
          description: Company/Seller Api-Key, generated by Enviame
          schema:
            type: string
      responses:
        '200':
          description: The employee list is displayed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: integer
                          description: Unique identifier of the employee in Enviame
                        marketplace_creator:
                          type: integer
                          description: ID of the Company/Seller it belongs to
                        marketplace_exclusive:
                          type: boolean
                          description: Indicates whether it belongs to a Marketplace or not
                        is_active:
                          type: boolean
                          description: Indicates whether the employee is active or not
                        first_name:
                          type: string
                          description: Employee first name
                        first_last:
                          type: string
                          description: ''
                        full_name:
                          type: string
                          description: Employee full name
                        email:
                          type: string
                          description: Employee email
                        phone:
                          type: string
                          description: Employee phone
                        mobile:
                          type: string
                          description: Employee mobile phone
                        position:
                          type: string
                          description: ''
                        created_at:
                          type: date
                          description: Employee creation date
                        updated_at:
                          type: date
                          description: Employee last data update date
                        deleted_at:
                          type: date
                          description: Employee deletion date
                        links:
                          type: array
                          items:
                            type: object
                            properties:
                              rel:
                                type: string
                              href:
                                type: string
                    example:
                      - identifier: 1311
                        marketplace_creator: null
                        marketplace_exclusive: false
                        is_active: false
                        first_name: René
                        first_last: null
                        full_name: René Álvarez
                        email: rene.alvarez@acroventus.com
                        phone: 56934104505
                        mobile: 56934104505
                        position: null
                        created_at: '2021-07-07 22:08:56'
                        updated_at: '2021-07-07 22:08:56'
                        deleted_at: null
                        links:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/employees/1311
                      - identifier: 3288
                        marketplace_creator: null
                        marketplace_exclusive: false
                        is_active: false
                        first_name: Usuario
                        first_last: null
                        full_name: Usuario Documentacion
                        email: documentaciones@enviame.io
                        phone: null
                        mobile: null
                        position: null
                        created_at: '2025-03-19 12:26:56'
                        updated_at: '2025-03-19 12:26:56'
                        deleted_at: null
                        links:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/employees/3288
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            type: string
                            description: Total employees
                            example: 2
                          count:
                            type: string
                            description: Employee count
                            example: 2
                          per_page:
                            type: string
                            description: Employees per page
                            example: 15
                          current_page:
                            type: string
                            description: Current page
                            example: 1
                          total_pages:
                            type: string
                            description: Total pages
                            example: 1
                          links:
                            type: string
                            description: current_page
                            example: {}
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    description: error type
                    example: Unauthorized.
                  code:
                    type: string
                    description: error code.
                    example: 401
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s1/v1/companies/{id_seller_}/warehouses/{warehouse_code}:
    get:
      tags:
        - Company/Seller
      summary: View a Company/Seller warehouse
      operationId: Ver-una-bodega-de-Company/Seller-Seller-v2
      description: >-
        Endpoint that allows viewing the data of an existing warehouse in a
        Company/Seller.
      parameters:
        - name: id_seller_
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: warehouse_code
          in: path
          required: true
          description: Alphanumeric code of the warehouse
          schema:
            type: string
        - name: api-key
          in: header
          required: true
          description: Company/Seller Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: Displays the data of the queried warehouse.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Warehouse internal ID
                        example: 18030
                      marketplace_creator:
                        type: string
                        description: ID of the seller who owns the warehouse
                        example: 1402
                      marketplace_exclusive:
                        type: boolean
                        description: ''
                        example: false
                      is_active:
                        type: boolean
                        description: Indicates whether the warehouse is active or inactive
                        example: true
                      name:
                        type: string
                        description: Warehouse name
                        example: Bodega Prueba Docu
                      code:
                        type: string
                        description: Alphanumeric code of the warehouse
                        example: bod_prueba_docu
                      contact_name:
                        type: string
                        description: Warehouse contact name
                        example: Cosme Fulanito
                      contact_phone:
                        type: string
                        description: Contact phone number
                        example: 998769876
                      contact_email:
                        type: string
                        description: Contact email
                        example: bodega-prueba@enviame.io
                      address:
                        type: object
                        properties:
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Cerrillos
                          place_id:
                            type: integer
                            description: Internal ID asignado al place
                            example: 105
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: Avenida Siempreviva 9870
                          information:
                            type: string
                            description: Additional information or address complement
                            example: Bodega B5
                          zip_code:
                            type: string
                            description: Postal code assigned to the place
                            example: null
                          latitude:
                            type: string
                            description: Latitude coordinates of the warehouse location
                            example: null
                          longitude:
                            type: string
                            description: Longitude coordinates of the warehouse location
                            example: null
                      created_at:
                        type: string
                        description: Warehouse creation date
                        example: '2025-03-18 14:32:54'
                      updated_at:
                        type: string
                        description: Warehouse data update date
                        example: '2025-03-18 14:32:54'
                      deleted_at:
                        type: string
                        description: Warehouse deletion date
                        example: null
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              example: self
                            href:
                              type: string
                              example: >-
                                https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/18030
                  errors:
                    type: string
                    description: creation errors
                    example: []
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    description: error type
                    example: Unauthorized.
                  code:
                    type: string
                    description: error code.
                    example: 401
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s1/v1/companies/{id_seller_}/warehouses:
    get:
      tags:
        - Company/Seller
      summary: List Company/Seller warehouses
      operationId: Listar-bodegas-Company/Seller-Seller-v2
      description: >-
        Endpoint that allows viewing the complete list of warehouses of a
        Company/Seller
      parameters:
        - name: id_seller_
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          required: true
          description: Company/Seller Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      responses:
        '201':
          description: Displays the list of Company/Seller warehouses
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: integer
                          description: Unique identifier of the warehouse
                        marketplace_creator:
                          type: integer
                          description: ID of the Company/Seller the warehouse belongs to
                        marketplace_exclusive:
                          type: boolean
                          description: Indicates whether it belongs to a marketplace or not
                        is_active:
                          type: boolean
                          description: Indicates whether the warehouse is active
                        name:
                          type: string
                          description: Warehouse name
                        code:
                          type: string
                          description: Warehouse alphanumeric code
                        contact_name:
                          type: string
                          description: Warehouse contact name
                        contact_phone:
                          type: string
                          description: Contact phone
                        contact_email:
                          type: string
                          description: Contact email
                        address: null
                        type: object
                        properties:
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                          place_id:
                            type: integer
                            description: Internal ID asignado al place
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                          information:
                            type: string
                            description: Additional information or address complement
                          zip_code:
                            type: string
                            description: Postal code assigned to the place
                          latitude:
                            type: string
                            description: Latitude coordinates of the warehouse location
                          longitude:
                            type: string
                            description: Longitude coordinates of the warehouse location
                        created_at:
                          type: string
                          description: Warehouse creation date
                        updated_at:
                          type: string
                          description: Last update date
                        deleted_at:
                          type: string
                          description: Deletion date
                        links:
                          type: array
                          items:
                            type: object
                            properties:
                              rel:
                                type: string
                              href:
                                type: string
                    example:
                      - identifier: 3121
                        marketplace_creator: 1402
                        marketplace_exclusive: false
                        is_active: false
                        name: Bodega Suc1
                        code: 3125060
                        contact_name: null
                        contact_phone: null
                        contact_email: null
                        address:
                          place: Quilicura
                          place_id: 320
                          full_address: Hidalgo 1208
                          information: null
                          zip_code: null
                          latitude: null
                          longitude: null
                        created_at: '2022-02-10 17:10:31'
                        updated_at: '2022-02-10 17:10:31'
                        deleted_at: null
                        links:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/3121
                      - identifier: 18030
                        marketplace_creator: 1402
                        marketplace_exclusive: false
                        is_active: true
                        name: Bodega Prueba Docu
                        code: bod_prueba_docu
                        contact_name: Cosme Fulanito
                        contact_phone: 998769876
                        contact_email: bodega-prueba@enviame.io
                        address:
                          place: Cerrillos
                          place_id: 105
                          full_address: Avenida Siempreviva 9870
                          information: Bodega B5
                          zip_code: null
                          latitude: null
                          longitude: null
                        created_at: '2025-03-18 14:32:54'
                        updated_at: '2025-03-18 14:32:54'
                        deleted_at: null
                        links:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/18030
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: Total Company/Seller warehouses
                            example: 2
                          count:
                            type: integer
                            description: Number of warehouses shown
                            example: 2
                          per_page:
                            type: integer
                            description: Warehouses per page
                            example: 15
                          current_page:
                            type: integer
                            description: Current page
                            example: 1
                          total_pages:
                            type: integer
                            description: Total pages
                            example: 1
                          links:
                            type: string
                            description: current_page
                            example: {}
                  errors:
                    type: string
                    description: Not defined
                    example: []
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    description: error type
                    example: Unauthorized.
                  code:
                    type: string
                    description: error code.
                    example: 401
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s1/v1/companies/{id_seller}/carriers:
    get:
      tags:
        - Company/Seller
      summary: List of active carriers in Company/Seller
      operationId: Listado-de-carriers-Activos-en-Company/Seller-v2
      description: Endpoint that allows listing the carriers assigned to a Company/Seller.
      parameters:
        - name: id_seller
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          required: true
          description: Company/Seller Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
        - name: Content-Type
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      responses:
        '201':
          description: Carrier list obtained.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
              data:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Carrier name
                    code:
                      type: string
                      description: Carrier code, assigned by Enviame
                    country:
                      type: string
                      description: Carrier country code
                    configurations:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            description: Carrier name
                          code:
                            type: string
                            description: Carrier code, assigned by Enviame
                          description:
                            type: string
                            description: ''
                          default:
                            type: boolean
                            description: ''
                example:
                  - name: BLUEXPRESS
                    code: BLX
                    country: CL
                    configurations:
                      - name: BLUEXPRESS
                        code: BLX
                        description: Bluexpress [New]
                        default: false
                  - name: CORREOSCHILE
                    code: CCH
                    country: CL
                    configurations:
                      - name: CORREOSCHILE
                        code: CCH
                        description: Correos Chile [New]
                        default: false
                  - name: GO-RABBIT
                    code: GRB
                    country: CL
                    configurations:
                      - name: GO-RABBIT
                        code: GRB
                        description: Go-Rabbit
                        default: false
                  - name: CHILEXPRESS
                    code: CHX
                    country: CL
                    configurations:
                      - name: CHILEXPRESS
                        code: CHX
                        description: Chilexpress [New]
                        default: false
                  - name: BEETRACK
                    code: BTR
                    country: CL
                    configurations:
                      - name: BEETRACK
                        code: BTR
                        description: Beetrack
                        default: false
                  - name: STARKEN
                    code: SKN
                    country: CL
                    configurations:
                      - name: STARKEN
                        code: SKN
                        description: Starken [New]
                        default: false
                  - name: TRANSPORTE INTERNO
                    code: INT
                    country: CL
                    configurations:
                      - name: TRANSPORTE INTERNO
                        code: INT
                        description: TRANSPORTE INTERNO
                        default: false
              meta:
                type: object
                properties:
                  pagination:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total Company/Seller carriers
                        example: 7
                      count:
                        type: integer
                        description: Number of carriers shown
                        example: 7
                      per_page:
                        type: integer
                        description: Carriers per page
                        example: 15
                      current_page:
                        type: integer
                        description: Current page
                        example: 1
                      total_pages:
                        type: integer
                        description: Total pages
                        example: 1
                      links:
                        type: string
                        description: current_page
                        example: {}
              errors:
                type: string
                description: Not defined
                example: []
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    description: error type
                    example: Unauthorized.
                  code:
                    type: string
                    description: error code.
                    example: 401
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s1/v1/companies/{id_seller_}/warehouses/{warehouse_id}:
    delete:
      tags:
        - Company/Seller
      summary: Delete a seller warehouse
      operationId: Eliminar-bodega-de-un-seller-v2
      description: Endpoint that allows deleting warehouses from a Company/Seller
      parameters:
        - name: id_seller
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: warehouse_id
          in: path
          required: true
          description: Warehouse ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          required: true
          description: Company/Seller Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
        - name: Content-Type
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      responses:
        '201':
          description: Deletion successful.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Warehouse internal ID
                        example: 2758
                      marketplace_creator:
                        type: string
                        description: ID of the seller who owns the warehouse
                        example: 1402
                      marketplace_exclusive:
                        type: boolean
                        description: ''
                        example: false
                      is_active:
                        type: boolean
                        description: Indicates whether the warehouse is active or inactive
                        example: true
                      name:
                        type: string
                        description: Warehouse name
                        example: bodega capsula 2
                      code:
                        type: string
                        description: Alphanumeric code of the warehouse
                        example: bod_capsula2
                      contact_name:
                        type: string
                        description: Warehouse contact name
                        example: null
                      contact_phone:
                        type: string
                        description: Contact phone number
                        example: null
                      contact_email:
                        type: string
                        description: Contact email
                        example: null
                      address:
                        type: object
                        properties:
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Quilicura
                          place_id:
                            type: integer
                            description: Internal ID asignado al place
                            example: 320
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: direccion completa nueva 2
                          information:
                            type: string
                            description: Additional information or address complement
                            example: null
                          zip_code:
                            type: string
                            description: Postal code assigned to the place
                            example: null
                          latitude:
                            type: string
                            description: Latitude coordinates of the warehouse location
                            example: null
                          longitude:
                            type: string
                            description: Longitude coordinates of the warehouse location
                            example: null
                      created_at:
                        type: string
                        description: Warehouse creation date
                        example: '2021-06-21 22:37:57'
                      updated_at:
                        type: string
                        description: Warehouse data update date
                        example: '2025-03-20 15:09:38'
                      deleted_at:
                        type: string
                        description: Warehouse deletion date
                        example: '2025-03-20 15:09:38'
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              example: self
                            href:
                              type: string
                              example: >-
                                https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/2758
                  errors:
                    type: string
                    description: creation errors
                    example: []
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s2/v2/marketplaces/{marketplace_id}/companies/{id_seller}/pickups:
    post:
      tags:
        - Pickups
      summary: Create pickup as a Marketplace seller
      operationId: create-pickup-as-seller-in-marketplace-v2
      description: |
        Endpoint to schedule pickups using a Marketplace api-key.  
        The response depends on each carrier's cutoff schedule.
      parameters:
        - name: marketplace_id
          in: path
          description: Marketplace ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          required: true
          description: Marketplace Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                carrier_code:
                  type: string
                  description: Required / Carrier code to request the pickup from.
                warehouse_code:
                  type: string
                  description: Required / Warehouse code where products will be picked up.
                qty:
                  type: int
                  format: int64
                  description: Required / Total number of packages to pick up.
                contact_name:
                  type: string
                  description: Required / Name of the pickup contact person (employee).
                contact_phone:
                  type: string
                  description: >-
                    Required / Phone number of the pickup contact person
                    (employee).
                range_time:
                  type: integer
                  description: >-
                    Required (AM or PM) / Can be AM for pickup before 12 PM or
                    PM for after 12 PM.
                pickup_date:
                  type: integer
                  format: date
                  description: >-
                    Optional / Pickup date in YYYY-MM-DD format / If empty, it
                    is scheduled for the next day.
                weight:
                  type: integer
                  description: Required / Approximate total weight (Kg.) of the packages.
                size:
                  type: string
                  description: Required / "xs, s, m, l, c" / Total size of the packages
                custom_size:
                  type: string
                  description: >-
                    Optional / Only applies for size = C / Pallet or full load
                    dimensions.
            example:
              value:
                carrier_code: BLX
                warehouse_code: bod_ruka1
                qty: 4
                contact_name: Usuario Bodega
                contact_phone: 123456789
                range_time: AM
                pickup_date: 21-03-2025
                weight: 5
                size: s
                custom_size: null
      responses:
        '200':
          description: The excel file was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 201
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Pickup number assigned by Enviame
                        example: '1285372591218'
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Company/Seller ID, generated by Enviame
                            example: 2279
                          code:
                            type: string
                            description: Alphanumeric code of the Company/Seller
                            example: DEV
                          name:
                            type: string
                            description: Company/Seller name
                            example: Development
                          dni:
                            type: string
                            description: Company/Seller RUT (DNI)
                            example: 106719926
                      address:
                        type: object
                        properties:
                          place_id:
                            type: integer
                            description: Internal ID assigned to the pickup location place
                            example: 378
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: Avenida Vitacura 123
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Santiago
                          information:
                            type: string
                            description: Additional information or address complement
                            example: H23
                          place_parents:
                            type: object
                            properties:
                              parent1:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: >-
                                      Internal ID assigned to the level1 of the
                                      pickup location
                                    example: 61
                                  name:
                                    type: string
                                    description: null
                                    example: Santiago
                                  level_name:
                                    type: string
                                    description: null
                                    example: Provincia
                              parent2:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: >-
                                      Internal ID assigned to the level2 of the
                                      pickup location
                                    example: 7
                                  name:
                                    type: string
                                    description: null
                                    example: Metropolitana de Santiago
                                  level_name:
                                    type: string
                                    description: null
                                    example: Region
                          place_level_name:
                            type: string
                            description: null
                            example: Comuna
                          zip_code:
                            type: string
                            description: null
                            example: null
                      carrier:
                        type: object
                        properties:
                          code:
                            type: string
                            description: Carrier internal code
                            example: BLX
                          name:
                            type: string
                            description: Carrier name
                            example: Bluexpress
                          country:
                            type: string
                            description: Carrier country code
                            example: CL
                          is_integrated:
                            type: integer
                            description: >-
                              Indicates whether the carrier is integrated and
                              automated
                            example: 1
                          time_zome:
                            type: string
                            description: Scheduled pickup timezone
                            example: America/Santiago
                          config:
                            type: object
                            properties:
                              time_limit:
                                type: string
                                description: Carrier cutoff schedule
                                example: '10:29'
                              time_limit_key:
                                type: string
                                description: null
                                example: default
                      range_time:
                        type: string
                        example: 13:00 - 18:00
                      qty:
                        type: integer
                        example: 7
                      weight:
                        type: integer
                        example: 10
                      contact:
                        type: object
                        properties:
                          name:
                            type: string
                            example: John Doe
                          phone:
                            type: string
                            example: 999999999
                      status:
                        type: object
                        properties:
                          code:
                            type: string
                            description: Pickup status code
                            example: created
                          name:
                            type: string
                            description: Operator status name
                            example: retiro creado
                          date:
                            type: integer
                            format: date
                            description: Pickup status time
                            example: '2025-04-04 16:50:11'
                      created_at:
                        type: integer
                        format: date
                        description: Pickup creation date and time
                        example: '2025-04-04 16:50:11'
                      updated_at:
                        type: integer
                        format: date
                        description: Pickup last update date and time
                        example: '2025-04-04 16:50:11'
                      deleted_at:
                        type: integer
                        format: date
                        description: Pickup deletion date and time
                        example: null
                      uuid:
                        type: string
                        description: null
                        example: d3e8a7ae-5a2a-43b3-a77b-e8c0a3e1718a
                      marketplace:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: >-
                              Marketplace ID, generated by Enviame (for
                              independent sellers, company 10 will appear)
                            example: 10
                          code:
                            type: string
                            description: Marketplace code
                            example: enviame
                          name:
                            type: string
                            description: Marketplace name
                            example: Envíame
                      type:
                        type: object
                        properties:
                          code:
                            type: string
                            description: Pickup type code
                            example: normal
                          name:
                            type: string
                            description: Pickup type name
                            example: retiro normal
                      size:
                        type: string
                        example: s
                      dimensions:
                        type: string
                        description: Average dimensions related to the size field
                        example: 10cm x 15cm x 5cm
                      pickup_date:
                        type: integer
                        format: date
                        description: Date on which the pickup will be made
                        example: '2025-04-07 00:00:00'
                      warehouse:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Warehouse internal ID
                            example: 8710
                          code:
                            type: string
                            example: DEV
                          name:
                            type: string
                            description: Warehouse name
                            example: DEV
                          contact:
                            type: object
                            properties:
                              name:
                                type: string
                                description: Warehouse internal contact name
                                example: Javier Smith
                              phone:
                                type: string
                                description: Warehouse contact phone number
                                example: 998874910
                              email:
                                type: string
                                description: Warehouse contact email
                                example: cinthia.garrido@enviame.io
                      need_evaluation:
                        type: boolean
                        description: >-
                          Indicates whether the pickup requires evaluation at
                          the end of the deadline
                        example: false
                      carrier_pickup_number:
                        type: string
                        description: Pickup number assigned by the carrier
                        example: 1285372591218
                      carrier_pickup_created:
                        type: boolean
                        description: >-
                          Indicates whether the pickup was created with the
                          operator
                        example: false
                      max_cancelation_date:
                        type: integer
                        format: date
                        description: Maximum date on which the delivery can be cancelled
                        example: null
                      id:
                        type: string
                        description: Internal ID
                        example: cRr8Kbj8zPAb4OsCyQxU
        '422':
          description: The request was not successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /s2/v2/companies/{id_seller}/pickups:
    post:
      tags:
        - Pickups
      summary: Create pickup as Company/Seller
      operationId: Create-pickup-as-a-Company/Seller-v2
      description: >-
        Endpoint to schedule pickups using a Company/Seller api-key. The
        response depends on each carrier's cutoff schedule.
      parameters:
        - name: api-key
          in: header
          required: true
          description: Marketplace Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                carrier_code:
                  type: string
                  description: Required / Carrier code to request the pickup from.
                warehouse_code:
                  type: string
                  description: Required / Warehouse code where products will be picked up.
                qty:
                  type: int
                  format: int64
                  description: Required / Total number of packages to pick up.
                contact_name:
                  type: string
                  description: Required / Name of the pickup contact person (employee).
                contact_phone:
                  type: string
                  description: >-
                    Required / Phone number of the pickup contact person
                    (employee).
                range_time:
                  type: integer
                  description: >-
                    Required (AM or PM) / Can be AM for pickup before 12 PM or
                    PM for after 12 PM.
                pickup_date:
                  type: integer
                  format: date
                  description: >-
                    Optional / Pickup date in YYYY-MM-DD format / If empty, it
                    is scheduled for the next day.
                weight:
                  type: integer
                  description: Required / Approximate total weight (Kg.) of the packages.
                size:
                  type: string
                  description: Required / "xs, s, m, l, c" / Total size of the packages
                custom_size:
                  type: string
                  description: >-
                    Optional / Only applies for size = C / Pallet or full load
                    dimensions.
            example:
              value:
                carrier_code: BLX
                warehouse_code: bod_ruka1
                qty: 4
                contact_name: Usuario Bodega
                contact_phone: 123456789
                range_time: AM
                pickup_date: 21-03-2025
                weight: 5
                size: s
                custom_size: null
      responses:
        '200':
          description: successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 201
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Pickup number assigned by Enviame
                        example: '1285372591218'
                      company:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Company/Seller ID, generated by Enviame
                            example: 2279
                          code:
                            type: string
                            description: Alphanumeric code of the Company/Seller
                            example: DEV
                          name:
                            type: string
                            description: Company/Seller name
                            example: Development
                          dni:
                            type: string
                            description: Company/Seller RUT (DNI)
                            example: 106719926
                      address:
                        type: object
                        properties:
                          place_id:
                            type: integer
                            description: Internal ID assigned to the pickup location place
                            example: 378
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: Avenida Vitacura 123
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Santiago
                          information:
                            type: string
                            description: Additional information or address complement
                            example: H23
                          place_parents:
                            type: object
                            properties:
                              parent1:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: >-
                                      Internal ID assigned to the level1 of the
                                      pickup location
                                    example: 61
                                  name:
                                    type: string
                                    description: null
                                    example: Santiago
                                  level_name:
                                    type: string
                                    description: null
                                    example: Provincia
                              parent2:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: >-
                                      Internal ID assigned to the level2 of the
                                      pickup location
                                    example: 7
                                  name:
                                    type: string
                                    description: null
                                    example: Metropolitana de Santiago
                                  level_name:
                                    type: string
                                    description: null
                                    example: Region
                          place_level_name:
                            type: string
                            description: null
                            example: Comuna
                          zip_code:
                            type: string
                            description: null
                            example: null
                      carrier:
                        type: object
                        properties:
                          code:
                            type: string
                            description: Carrier internal code
                            example: BLX
                          name:
                            type: string
                            description: Carrier name
                            example: Bluexpress
                          country:
                            type: string
                            description: Carrier country code
                            example: CL
                          is_integrated:
                            type: integer
                            description: >-
                              Indicates whether the carrier is integrated and
                              automated
                            example: 1
                          time_zome:
                            type: string
                            description: Scheduled pickup timezone
                            example: America/Santiago
                          config:
                            type: object
                            properties:
                              time_limit:
                                type: string
                                description: Carrier cutoff schedule
                                example: '10:29'
                              time_limit_key:
                                type: string
                                description: null
                                example: default
                      range_time:
                        type: string
                        example: 13:00 - 18:00
                      qty:
                        type: integer
                        example: 7
                      weight:
                        type: integer
                        example: 10
                      contact:
                        type: object
                        properties:
                          name:
                            type: string
                            example: John Doe
                          phone:
                            type: string
                            example: 999999999
                      status:
                        type: object
                        properties:
                          code:
                            type: string
                            description: Pickup status code
                            example: created
                          name:
                            type: string
                            description: Operator status name
                            example: retiro creado
                          date:
                            type: integer
                            format: date
                            description: Pickup status time
                            example: '2025-04-04 16:50:11'
                      created_at:
                        type: integer
                        format: date
                        description: Pickup creation date and time
                        example: '2025-04-04 16:50:11'
                      updated_at:
                        type: integer
                        format: date
                        description: Pickup last update date and time
                        example: '2025-04-04 16:50:11'
                      deleted_at:
                        type: integer
                        format: date
                        description: Pickup deletion date and time
                        example: null
                      uuid:
                        type: string
                        description: null
                        example: d3e8a7ae-5a2a-43b3-a77b-e8c0a3e1718a
                      marketplace:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: >-
                              Marketplace ID, generated by Enviame (for
                              independent sellers, company 10 will appear)
                            example: 10
                          code:
                            type: string
                            description: Marketplace code
                            example: enviame
                          name:
                            type: string
                            description: Marketplace name
                            example: Envíame
                      type:
                        type: object
                        properties:
                          code:
                            type: string
                            description: Pickup type code
                            example: normal
                          name:
                            type: string
                            description: Pickup type name
                            example: retiro normal
                      size:
                        type: string
                        example: s
                      dimensions:
                        type: string
                        description: Average dimensions related to the size field
                        example: 10cm x 15cm x 5cm
                      pickup_date:
                        type: integer
                        format: date
                        description: Date on which the pickup will be made
                        example: '2025-04-07 00:00:00'
                      warehouse:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Warehouse internal ID
                            example: 8710
                          code:
                            type: string
                            example: DEV
                          name:
                            type: string
                            description: Warehouse name
                            example: DEV
                          contact:
                            type: object
                            properties:
                              name:
                                type: string
                                description: Warehouse internal contact name
                                example: Javier Smith
                              phone:
                                type: string
                                description: Warehouse contact phone number
                                example: 998874910
                              email:
                                type: string
                                description: Warehouse contact email
                                example: cinthia.garrido@enviame.io
                      need_evaluation:
                        type: boolean
                        description: >-
                          Indicates whether the pickup requires evaluation at
                          the end of the deadline
                        example: false
                      carrier_pickup_number:
                        type: string
                        description: Pickup number assigned by the carrier
                        example: 1285372591218
                      carrier_pickup_created:
                        type: boolean
                        description: >-
                          Indicates whether the pickup was created with the
                          operator
                        example: false
                      max_cancelation_date:
                        type: integer
                        format: date
                        description: Maximum date on which the delivery can be cancelled
                        example: null
                      id:
                        type: string
                        description: Internal ID
                        example: cRr8Kbj8zPAb4OsCyQxU
        '422':
          description: The request was not successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    /marketplaces/{marketplace_id}/pickups:
      get:
        tags:
          - Pickups
        summary: List pickups as Marketplaces
        operationId: listar-retiros-como-Marketplaces-v3
        description: >-
          Endpoint that allows listing all pickups from the Company/Sellers of a
          Marketplace. Only works in production environment.
        parameters:
          - name: marketplace_id
            in: path
            description: Marketplace ID, generated by Enviame
            required: true
            schema:
              type: integer
              format: int64
          - name: api-key
            in: header
            required: true
            description: Marketplace Api-Key, generated by Enviame
            schema:
              type: string
          - name: Accept
            in: header
            required: true
            description: Not modified
            schema:
              type: string
              default: application/json
        responses:
          '200':
            description: The excel file was created successfully.
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    status:
                      type: string
                      enum:
                        - success
                      description: Status of the request
                    data:
                      type: object
                      properties:
                        url:
                          type:
                            - string
                            - null
                          format: uri
                          description: URL to download the excel file.
          '422':
            description: The request was not successful.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponse'
          '500':
            description: An error occurred.
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/ErrorResponse'
  /s2/v2/companies/{id_seller_}/pickups:
    get:
      tags:
        - Pickups
      summary: List pickups as Seller
      operationId: Listar-retiros-como-seller-v2
      description: >-
        Lists all pickups created by a Company/Seller. Only works in production
        environment.
      parameters:
        - name: id_seller_
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Status of the request
        '422':
          description: The request was not successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /companies/{id_seller}/return-deliveries:
    servers:
      - url: https://api.enviame.io
        description: Specific URL for production returns
      - url: https://stage.api.enviame.io
        description: Specific URL for staging returns
    parameters:
      - name: id_seller
        in: path
        required: true
        schema:
          type: integer
        description: Seller ID
    post:
      tags:
        - Returns
      summary: Create return
      operationId: Crear-devolucion-V2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/return.create.request'
            examples:
              domicilio_a_domicilio:
                summary: Home origin → Home destination
                value:
                  origin:
                    place: Valparaíso
                    full_address: Av. Siempre Viva 123
                    information: Casa blanca, 2 pisos
                    contact:
                      name: Alicia Pérez
                      phone: '+56911111111'
                      email: alicia.perez@example.com
                  destination:
                    place: Santiago
                    full_address: Av. Providencia 456
                    information: Depto 702
                    contact:
                      name: Roberto Díaz
                      phone: '+56922222222'
                      email: roberto.diaz@example.com
                  order:
                    type: return
                    imported_id: RET-001234
                    n_packages: 1
                    packages:
                      - id: 1
                        price: '4000'
                        description: Accesorio genérico
                        weight: '1'
                        volume: '2'
                  carrier:
                    code: CHX
                    service: nextdayReturn
                    type: ''
                    attribute: ''
              domicilio_a_bodega:
                summary: Home origin → Warehouse destination
                value:
                  origin:
                    place: Valparaíso
                    full_address: Calle Verde 789
                    information: Puerta negra
                    contact:
                      name: Alicia Pérez
                      phone: '+56911111111'
                      email: alicia.perez@example.com
                  destination:
                    code_warehouse: DEV
                  order:
                    type: return
                    imported_id: RET-001235
                    n_packages: 1
                    packages:
                      - id: 1
                        price: '4000'
                        description: Accesorio genérico
                        weight: '1'
                        volume: '2'
                  carrier:
                    code: CHX
                    service: nextdayReturn
                    type: ''
                    attribute: ''
              pudo_a_bodega:
                summary: PUDO origin → Warehouse destination
                value:
                  origin:
                    type: pudo_or_agency_legacy
                    pudo_code: CHX9999
                    contact:
                      name: Alicia Pérez
                      email: alicia.perez@example.com
                  destination:
                    code_warehouse: DEV
                  order:
                    type: return
                    imported_id: RET-001236
                    n_packages: 1
                    packages:
                      - id: 1
                        price: '4000'
                        description: Accesorio genérico
                        weight: '1'
                        volume: '2'
                  carrier:
                    code: CHX
                    service: nextdayReturn
                    type: ''
                    attribute: ''
              pudo_a_domicilio:
                summary: PUDO origin → Home destination
                value:
                  origin:
                    type: pudo_or_agency_legacy
                    pudo_code: CHX9999
                    contact:
                      name: Alicia Pérez
                      email: alicia.perez@example.com
                  destination:
                    place: Iquique
                    full_address: Av. Monte de los Olivos 2923
                    information: Portón café
                    contact:
                      name: Roberto Díaz
                      phone: '+56922222222'
                      email: roberto.diaz@example.com
                  order:
                    type: return
                    imported_id: RET-001237
                    n_packages: 1
                    packages:
                      - id: 1
                        price: '4000'
                        description: Accesorio genérico
                        weight: '1'
                        volume: '2'
                  carrier:
                    code: CHX
                    service: nextdayReturn
                    type: ''
                    attribute: ''
      responses:
        '200':
          description: Return created
          content:
            application/json:
              examples:
                success:
                  summary: Successful response
                  value:
                    code: Success
                    message: creation success
                    data:
                      id: 300100001
                      imported_id: RET-001234
                      tracking_number: '712938900000'
                      labels:
                        - >-
                          https://storage.googleapis.com/carrier-labels/202508/300100001/label.pdf
                      current_status:
                        name: Listo para despacho
                        status_code: CREATED
                        comment: Creado en carrier CHX con OT 712938900000
                        created_at: '2025-08-25 22:00:00'
        '422':
          description: Request validation error
          content:
            application/json:
              examples:
                origen_invalido:
                  summary: Invalid origin
                  value:
                    code: fail
                    message: there was an error with the request
                    data: null
                    errors:
                      - code: value_error
                        message: invalid origin
                        field: origin.address
                        debug: null
                pudo_code_faltante:
                  summary: Missing PUDO code
                  value:
                    code: fail
                    message: there was an error in input data.
                    data: null
                    errors:
                      - code: value_error
                        message: place is required if pudo_code is not supplied
                        field: origin.place
                      - code: value_error
                        message: full_address is required if pudo_code is not supplied
                        field: origin.full_address
                contacto_origen_faltante:
                  summary: Missing origin contact
                  value:
                    code: fail
                    message: there was an error in input data.
                    data: null
                    errors:
                      - code: value_error
                        message: field required
                        field: origin.contact
                destino_place_faltante:
                  summary: Home destination without place
                  value:
                    code: fail
                    message: there was an error in input data.
                    data: null
                    errors:
                      - code: value_error
                        message: place is required if code_warehouse is not supplied
                        field: destination.place
                destino_full_address_faltante:
                  summary: Home destination without full_address
                  value:
                    code: fail
                    message: there was an error in input data.
                    data: null
                    errors:
                      - code: value_error
                        message: >-
                          full_address is required if code_warehouse is not
                          supplied
                        field: destination.full_address
                servicio_invalido:
                  summary: Invalid service
                  value:
                    code: fail
                    message: there was an error with the request
                    data: null
                    errors:
                      - code: value_error
                        message: invalid service code for delivery type return
                        field: order.carrier.service
                        debug: null
                carrier_invalido:
                  summary: Invalid carrier or no return service
                  value:
                    code: fail
                    message: there was an error with the request
                    data: null
                    errors:
                      - code: value_error
                        message: Carrier not found or configured with rules
                        field: carrier.code
                        debug: null
                packages_faltantes:
                  summary: Missing order.packages
                  value:
                    code: fail
                    message: there was an error in input data.
                    data: null
                    errors:
                      - code: value_error
                        message: field required
                        field: order.packages
                type_return_faltante:
                  summary: Invalid order.type
                  value:
                    code: fail
                    message: there was an error with the request
                    data: null
                    errors:
                      - code: value_error
                        message: invalid return type
                        field: type
                        debug: null
                devolucion_existente:
                  summary: Return already exists
                  value:
                    code: fail
                    message: there was an error with the request
                    data: null
                    errors:
                      - code: value_error
                        message: Delivery already exists
                        field: null
                        debug: null
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                code: error
                message: Internal server error
                data: null
  /return_deliveries/{imported_id}/tracking:
    servers:
      - url: https://api.enviame.io
        description: Specific URL for production returns
      - url: https://stage.api.enviame.io
        description: Specific URL for staging returns
    parameters:
      - name: imported_id
        in: path
        required: true
        schema:
          type: string
        description: Return identifier (imported_id)
    get:
      tags:
        - Returns
      summary: Get return tracking
      operationId: Tracking-devolucion-v2
      responses:
        '200':
          description: Tracking obtained
          content:
            application/json:
              examples:
                ejemplo:
                  value:
                    code: Success
                    message: ok
                    data:
                      imported_id: RET-001234
                      tracking_number: '712938900000'
                      history:
                        - status_code: CREATED
                          name: Listo para despacho
                          comment: Orden creada
                          created_at: '2025-08-25 22:00:00'
                        - status_code: IN_TRANSIT
                          name: En tránsito
                          comment: Salida a ruta
                          created_at: '2025-08-26 08:00:00'
                        - status_code: DELIVERED
                          name: Entregado
                          comment: Recibido en bodega DEV
                          created_at: '2025-08-27 11:30:00'
        '404':
          description: Return not found
        '500':
          description: Internal server error
  /companies/{id_seller}/deliveries/{delivery_id}/return:
    servers:
      - url: https://api.enviame.io
        description: Specific URL for production returns
      - url: https://stage.api.enviame.io
        description: Specific URL for staging returns
    parameters:
      - name: id_seller
        in: path
        required: true
        schema:
          type: integer
        description: Seller ID
      - name: delivery_id
        in: path
        required: true
        schema:
          type: integer
        description: Original delivery ID
    post:
      tags:
        - Returns
      summary: Create return from an existing delivery
      operationId: Crear-devolucion-desde-envio-v2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    imported_id:
                      type: string
                    n_packages:
                      type: integer
                    packages:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type:
                              - integer
                              - string
                          description:
                            type: string
                          price:
                            type: string
                          weight:
                            type: string
                          volume:
                            type: string
                carrier:
                  type: object
                  properties:
                    code:
                      type: string
                    service:
                      type: string
      responses:
        '200':
          description: Return created from delivery
          content:
            application/json:
              examples:
                ok:
                  value:
                    code: Success
                    message: creation success
                    data:
                      id: 300107999
                      imported_id: RET-002000
                      tracking_number: '712938999999'
                      current_status:
                        name: Listo para despacho
                        status_code: CREATED
                        comment: Creado en carrier CHX con OT 712938999999
                        created_at: '2025-08-25 22:40:00'
        '400':
          description: Request validation error
        '404':
          description: Delivery not found
        '500':
          description: Internal server error
  /s1/v1/marketplaces/{marketplace_id}/companies/{id_seller}/warehouses:
    post:
      tags:
        - Marketplace
      summary: Create Warehouse in Company/Seller as Marketplace
      operationId: Bodega-Seller-MKP
      description: >-
        Endpoint that allows creating warehouses for a Company/Seller using the
        associated Marketplace's API Key. At least one warehouse must be created
        in order to generate deliveries.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: id_Marketplace
          in: path
          description: Marketplace ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Marketplace Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Required / Warehouse name
                code:
                  type: string
                  description: Required / Alphanumeric code of the warehouse
                place:
                  type: string
                  description: >-
                    Required / Commune (CL) - City/Municipality (CO) - District
                    (PE) - Neighborhood (MX) - Municipality (AR) where the
                    warehouse is located
                full_address:
                  type: string
                  description: Required / Full address of the warehouse, excluding commune
                information:
                  type: string
                  description: Additional information or address complement
                contact_name:
                  type: string
                  description: Warehouse contact name
                contact_phone:
                  type: string
                  description: Contact phone number
                contact_email:
                  type: string
                  description: Contact email
            example:
              value:
                name: Bodega Prueba Docu
                code: bod_prueba_docu
                place: Cerrillos
                full_address: Avenida Siempreviva 987
                information: Bodega B5
                contact_name: Cosme Fulanito
                contact_phone: 998769876
                contact_email: bodega-prueba@enviame.io
      responses:
        '201':
          description: Warehouse successfully created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Successful request result
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Warehouse internal ID
                        example: 18035
                      marketplace_creator:
                        type: string
                        description: ID of the seller who owns the warehouse
                        example: 23314
                      marketplace_exclusive:
                        type: boolean
                        description: ''
                        example: false
                      is_active:
                        type: boolean
                        description: Indicates whether the warehouse is active or inactive
                        example: true
                      name:
                        type: string
                        description: Warehouse name
                        example: Bodega 2
                      code:
                        type: string
                        description: Alphanumeric code of the warehouse
                        example: bod_prueba_akagi
                      contact_name:
                        type: string
                        description: Warehouse contact name
                        example: Contacto Prueba
                      contact_phone:
                        type: string
                        description: Contact phone number
                        example: 987656789
                      contact_email:
                        type: string
                        description: Contact email
                        example: bodega-prueba@enviame.io
                      address:
                        type: object
                        properties:
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Cerrillos
                          place_id:
                            type: integer
                            description: Internal ID asignado al place
                            example: 105
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: Calle Bodega Akagi 2
                          information:
                            type: string
                            description: Additional information or address complement
                            example: Oficina 7
                          zip_code:
                            type: string
                            description: Postal code assigned to the place
                            example: null
                          latitude:
                            type: string
                            description: Latitude coordinates of the warehouse location
                            example: null
                          longitude:
                            type: string
                            description: Longitude coordinates of the warehouse location
                            example: null
                      created_at:
                        type: date
                        description: Warehouse creation date
                        example: '2025-03-21 18:49:26'
                      updated_at:
                        type: date
                        description: Warehouse data update date
                        example: '2025-03-21 18:49:26'
                      deleted_at:
                        type: date
                        description: Warehouse deletion date
                        example: null
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              example: self
                            href:
                              type: string
                              example: >-
                                https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/18035
                  errors:
                    type: string
                    description: creation errors
                    example: []
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred
  /s1/v1/marketplaces/{marketplace_id}/companies/{id_seller}/warehouses/{warehouse_code}:
    put:
      tags:
        - Marketplace
      summary: Edit Company/Seller Warehouse from Marketplace
      operationId: Bodega-Company/Seller-seller-Marketplace
      description: >-
        Endpoint that allows modifying warehouse data of a Company/Seller
        associated with a Marketplace.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: marketplace_id
          in: path
          description: Marketplace ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: warehouse_code
          in: path
          description: Alphanumeric code of the warehouse
          required: true
          schema:
            type: string
        - name: api-key
          in: header
          description: Marketplace Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Warehouse name
                  example: Bodega 2
                place:
                  type: string
                  description: >-
                    Required / Commune (CL) - City/Municipality (CO) - District
                    (PE) - Neighborhood (MX) - Municipality (AR) where the
                    warehouse is located
                  example: Cerrillos
                full_address:
                  type: string
                  description: Warehouse address, excluding commune
                  example: Avenida Siempreviva 24
      responses:
        '200':
          description: Warehouse edited and changes saved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: 'Indicates the operation status. '
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Warehouse internal ID
                        example: 18035
                      marketplace_creator:
                        type: string
                        description: ID of the seller who owns the warehouse
                        example: 23314
                      marketplace_exclusive:
                        type: boolean
                        description: ''
                        example: false
                      is_active:
                        type: boolean
                        description: Indicates whether the warehouse is active or inactive
                        example: true
                      name:
                        type: string
                        description: Warehouse name
                        example: Bodega 2
                      code:
                        type: string
                        description: Alphanumeric code of the warehouse
                        example: bod_prueba_akagi
                      contact_name:
                        type: string
                        description: Warehouse contact name
                        example: Contacto Prueba
                      contact_phone:
                        type: string
                        description: Contact phone number
                        example: 987656789
                      contact_email:
                        type: string
                        description: Contact email
                        example: bodega-prueba@enviame.io
                      address:
                        type: object
                        properties:
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Cerrillos
                          place_id:
                            type: integer
                            description: Internal ID asignado al place
                            example: 105
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: Calle Bodega Akagi 2
                          information:
                            type: string
                            description: Additional information or address complement
                            example: Oficina 7
                          zip_code:
                            type: string
                            description: Postal code assigned to the place
                            example: null
                          latitude:
                            type: string
                            description: Latitude coordinates of the warehouse location
                            example: null
                          longitude:
                            type: string
                            description: Longitude coordinates of the warehouse location
                            example: null
                      created_at:
                        type: date
                        description: Warehouse creation date
                        example: '2025-03-21 18:49:26'
                      updated_at:
                        type: date
                        description: Warehouse data update date
                        example: '2025-03-21 18:49:26'
                      deleted_at:
                        type: date
                        description: Warehouse deletion date
                        example: null
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              example: self
                            href:
                              type: string
                              example: >-
                                https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/18035
                  errors:
                    type: string
                    description: creation errors
                    example: []
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred.
  /s1/v1/marketplaces/{marketplace_id}/companies/{id_seller}/warehouses/{warehouse_id}:
    delete:
      tags:
        - Marketplace
      summary: Delete Company/Seller Warehouse from Marketplace
      operationId: Eliminar-Bodega-mkp
      description: >-
        Endpoint that allows deleting one of the warehouses of a Company/Seller
        associated with a Marketplace.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: marketplace_id
          in: path
          description: Marketplace ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: warehouse_id
          in: path
          description: Warehouse ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Marketplace Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: Warehouse deletion
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: 'Indicates the operation status. '
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Warehouse internal ID
                        example: 18035
                      marketplace_creator:
                        type: string
                        description: ID of the seller who owns the warehouse
                        example: 23314
                      marketplace_exclusive:
                        type: boolean
                        description: ''
                        example: false
                      is_active:
                        type: boolean
                        description: Indicates whether the warehouse is active or inactive
                        example: true
                      name:
                        type: string
                        description: Warehouse name
                        example: Bodega 2
                      code:
                        type: string
                        description: Alphanumeric code of the warehouse
                        example: bod_prueba_akagi
                      contact_name:
                        type: string
                        description: Warehouse contact name
                        example: Contacto Prueba
                      contact_phone:
                        type: string
                        description: Contact phone number
                        example: 987656789
                      contact_email:
                        type: string
                        description: Contact email
                        example: bodega-prueba@enviame.io
                      address:
                        type: object
                        properties:
                          place:
                            type: string
                            description: >-
                              Commune (CL) - City/Municipality (CO) - District
                              (PE) - Neighborhood (MX) - Municipality (AR) where
                              the warehouse is located
                            example: Cerrillos
                          place_id:
                            type: integer
                            description: Internal ID asignado al place
                            example: 105
                          full_address:
                            type: string
                            description: Full address of the warehouse, excluding commune
                            example: Calle Bodega Akagi 2
                          information:
                            type: string
                            description: Additional information or address complement
                            example: Oficina 7
                          zip_code:
                            type: string
                            description: Postal code assigned to the place
                            example: null
                          latitude:
                            type: string
                            description: Latitude coordinates of the warehouse location
                            example: null
                          longitude:
                            type: string
                            description: Longitude coordinates of the warehouse location
                            example: null
                      created_at:
                        type: date
                        description: Warehouse creation date
                        example: '2025-03-21 18:49:26'
                      updated_at:
                        type: date
                        description: Warehouse data update date
                        example: '2025-03-21 19:23:57'
                      deleted_at:
                        type: date
                        description: Warehouse deletion date
                        example: '2025-03-21 19:23:57'
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              example: self
                            href:
                              type: string
                              example: >-
                                https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/warehouses/18035
                  errors:
                    type: string
                    description: creation errors
                    example: []
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred.
  /s1/v1/marketplaces/{marketplace_id}/companies:
    get:
      tags:
        - Marketplace
      summary: List Sellers
      operationId: Listar-Sellers-MKP
      description: >-
        Endpoint that allows listing all Company/Sellers associated with a
        Marketplace.
      parameters:
        - name: marketplace_id
          in: path
          description: Marketplace ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Marketplace Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: List of sellers
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: 'Indicates the operation status. '
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: integer
                          description: Company/Seller ID, generated by Enviame
                        name:
                          type: string
                          description: Company/Seller name
                        corporate_name:
                          type: string
                          description: Corporate name / Legal name
                        dni:
                          type: string
                          description: Company/Seller RUT (DNI)
                        website:
                          type: string
                          description: Company/Seller website
                        activated:
                          type: integer
                          description: >-
                            Indicates whether the Company/Seller is active (1)
                            or inactive (0)
                        logo:
                          type: string
                          description: >-
                            Internal URL with the path to the Company/Seller
                            logo, if uploaded
                        code:
                          type: string
                          description: Alphanumeric code of the Company/Seller
                        api_key:
                          type: string
                          description: API Key propia de the Company/Seller
                        country:
                          type: string
                          description: Company/Seller country code
                        rule:
                          type: integer
                          description: Currently unused, it indicated the assigned rule
                        created_at:
                          type: date
                          description: Company/Seller creation date
                        updated_at:
                          type: date
                          description: Company/Seller last data update date
                        deleted_at:
                          type: date
                          description: Company/Seller deletion date
                        links:
                          type: array
                          items:
                            type: object
                            properties:
                              rel:
                                type: string
                                description: Relationship of the link to the resource.
                              href:
                                type: string
                                description: Resource URL.
                    example:
                      - identifier: 23315
                        name: Team Rukawa
                        corporate_name: Rukawa Team
                        dni: 111111111111
                        website: null
                        activated: 1
                        logo: null
                        code: rukawa
                        api_key: 526507674963f91839ff24d52d97e2cc
                        country: CL
                        rule: null
                        created_at: '2025-03-18 13:07:24'
                        updated_at: '2025-03-18 16:07:25'
                        deleted_at: null
                        links:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23315
                          - rel: companies.employees
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23315/employees
                          - rel: companies.warehouses
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23315/warehouses
                          - rel: companies.carriers
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23315/carriers
                      - identifier: 23316
                        name: Team Sakuragi
                        corporate_name: Sakuragi
                        dni: 111111111111
                        website: null
                        activated: 1
                        logo: null
                        code: sakuragi
                        api_key: b07bcc089587489ed0c3018b2cb50d10
                        country: CL
                        rule: null
                        created_at: '2025-03-18 13:08:57'
                        updated_at: '2025-03-18 16:08:58'
                        deleted_at: null
                        links:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23316
                          - rel: companies.employees
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23316/employees
                          - rel: companies.warehouses
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23316/warehouses
                          - rel: companies.carriers
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23316/carriers
                      - identifier: 23317
                        name: Akagi
                        corporate_name: Akagi
                        dni: 111111111111
                        website: null
                        activated: 1
                        logo: null
                        code: akagiii
                        api_key: 935a4d6a35fd2fc593f9705de644b66c
                        country: CL
                        rule: null
                        created_at: '2025-03-18 13:39:21'
                        updated_at: '2025-03-18 16:46:32'
                        deleted_at: null
                        links:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23317
                          - rel: companies.employees
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23317/employees
                          - rel: companies.warehouses
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23317/warehouses
                          - rel: companies.carriers
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23317/carriers
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: Total Marketplace sellers
                            example: 3
                          count:
                            type: integer
                            description: Number of sellers shown
                            example: 3
                          per_page:
                            type: integer
                            description: Sellers per page
                            example: 15
                          current_page:
                            type: integer
                            description: Current page
                            example: 1
                          total_pages:
                            type: integer
                            description: Total pages
                            example: 1
                          links:
                            type: string
                            description: current_page
                            example: {}
                  errors:
                    type: string
                    description: Not defined
                    example: []
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred.
  /marketplaces/{marketplace_id}/companies/{id_seller}/carriers:
    post:
      tags:
        - Marketplace
      summary: Assign carrier to Company/Seller
      operationId: Asignar-carrier-seller
      description: >-
        Endpoint that allows assigning a carrier to a Company/Seller, from those
        already assigned to the Marketplace.
      parameters:
        - name: id_seller
          in: path
          description: Company/Seller ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: marketplace_id
          in: path
          description: Marketplace ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Marketplace Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Assign a carrier to a Company/Seller
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: Required / Carrier code
                  example: BLX
      responses:
        '200':
          description: Shipment created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: 'Indicates the operation status. '
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Carrier name
                        code:
                          type: string
                          description: Carrier code, assigned by Enviame
                        country:
                          type: string
                          description: Carrier country code
                        configurations:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                description: Carrier name
                              code:
                                type: string
                                description: Carrier code, assigned by Enviame
                              description:
                                type: string
                                description: ''
                              default:
                                type: boolean
                                description: ''
                    example:
                      - name: BLUEXPRESS
                        code: BLX
                        country: CL
                        configurations:
                          - name: BLUEXPRESS
                            code: BLX
                            description: Bluexpress [New]
                            default: false
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: Total Company/Seller carriers
                            example: 1
                          count:
                            type: integer
                            description: Number of carriers shown
                            example: 1
                          per_page:
                            type: integer
                            description: Carriers per page
                            example: 15
                          current_page:
                            type: integer
                            description: Current page
                            example: 1
                          total_pages:
                            type: integer
                            description: Total pages
                            example: 1
                          links:
                            type: string
                            description: ''
                            example: {}
                  errors:
                    type: string
                    description: Not defined
                    example: []
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred.
  /api/s1/v1/marketplaces/{marketplace_id}/companies/{id_seller}:
    put:
      tags:
        - Marketplace
      summary: Edit Seller as Marketplace
      operationId: Editar-Seller-como-Marketplace
      description: >-
        Endpoint that allows editing data of a Company/Seller belonging to a
        Marketplace
      parameters:
        - name: marketplace_id
          in: path
          required: true
          description: Marketplace ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: id_seller
          in: path
          required: true
          description: Company/Seller ID, generated by Enviame
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          required: true
          description: Marketplace Api-Key, generated by Enviame
          schema:
            type: string
        - name: Accept
          in: header
          required: true
          description: Not modified
          schema:
            type: string
            default: application/json
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Company/Seller name
                corporate_name:
                  type: string
                  description: Corporate name / Legal name
                code:
                  type: string
                  description: Alphanumeric code of the Company/Seller
                dni:
                  type: string
                  description: Company/Seller RUT (DNI)
                website:
                  type: string
                  description: Company/Seller website
            example:
              value:
                name: Team Akagi
                corporate_name: Akagi Team
                code: akagi
                dni: 11.111.111-1
                website: www.akagiteam.cl
      responses:
        '200':
          description: Company/Seller edited and changes saved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Indicates the operation status
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Company/Seller ID, generated by Enviame
                        example: 23317
                      name:
                        type: string
                        description: Company/Seller name
                        example: Team Akagi
                      corporate_name:
                        type: string
                        description: Legal name
                        example: Akagi Team
                      dni:
                        type: string
                        description: Company/Seller RUT (DNI)
                        example: 11.111.111-1
                      website:
                        type: string
                        description: Company/Seller website
                        example: www.akagiteam.cl
                      activated:
                        type: integer
                        description: >-
                          Indicates whether the Company/Seller is active (1) or
                          inactive (0)
                        example: 1
                      logo:
                        type: string
                        description: >-
                          Internal URL with the path to the Company/Seller logo,
                          if uploaded
                        example: null
                      code:
                        type: string
                        description: Alphanumeric code of the Company/Seller
                        example: akagiii
                      country:
                        type: string
                        description: Company/Seller country code
                        example: CL
                      rule:
                        type: integer
                        description: Currently unused, it indicated the assigned rule
                        example: null
                      created_at:
                        type: string
                        description: Company/Seller creation date
                        example: '2025-03-18 13:39:21'
                      updated_at:
                        type: string
                        description: Company/Seller last data update date
                        example: '2025-03-18 16:43:25'
                      deleted_at:
                        type: string
                        description: Company/Seller deletion date
                        example: null
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              description: Relationship of the link to the resource.
                            href:
                              type: string
                              description: Resource URL.
                        example:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23317
                          - rel: companies.employees
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23317/employees
                          - rel: companies.warehouses
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23317/warehouses
                          - rel: companies.carriers
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23317/carriers
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    description: error type
                    example: Unauthorized.
                  code:
                    type: string
                    description: error code.
                    example: 401
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /marketplaces/{marketplace_id_}/companies:
    post:
      tags:
        - Marketplace
      summary: Create Seller as Marketplace
      operationId: Crear-Seller-Marketplace
      description: Endpoint that allows creating a Company/Seller in a Marketplace
      parameters:
        - name: marketplace_id_
          in: path
          description: Marketplace ID, generated by Enviame
          required: true
          schema:
            type: integer
            format: int64
        - name: api-key
          in: header
          description: Marketplace Api-Key, generated by Enviame
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: Not modified
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: Crear seller como marketplace
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Required / Company/Seller name
                  example: Team Mitsui
                corporate_name:
                  type: string
                  description: Required / Corporate name / Legal name
                  example: Mitsui Team
                code:
                  type: string
                  description: Alphanumeric code to be assigned to the Company/Seller
                  example: mitsui_team
                dni:
                  type: string
                  description: Required / Company/Seller RUT (DNI)
                  example: 111111111111
                rule:
                  type: integer
                  description: Rule ID to assign, not used
                carrier_code:
                  type: array
                  description: List of couriers to add to the Company/Seller
                  items:
                    type: string
                    example: BLX, CHX, CCH, SKN
      responses:
        '200':
          description: Shipment created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                    description: Indicates the operation status
                  data:
                    type: object
                    properties:
                      identifier:
                        type: string
                        description: Company/Seller ID, generated by Enviame
                        example: 23321
                      name:
                        type: string
                        description: Company/Seller name
                        example: Team Mitsui
                      corporate_name:
                        type: string
                        description: Legal name
                        example: Mitsui Team
                      dni:
                        type: string
                        description: Company/Seller RUT (DNI)
                        example: 111111111111
                      website:
                        type: string
                        description: Company/Seller website
                        example: null
                      activated:
                        type: integer
                        description: >-
                          Indicates whether the Company/Seller is active (1) or
                          inactive (0)
                        example: 1
                      logo:
                        type: string
                        description: >-
                          Internal URL with the path to the Company/Seller logo,
                          if uploaded
                        example: null
                      code:
                        type: string
                        description: Alphanumeric code of the Company/Seller
                        example: mitsui_team
                      country:
                        type: string
                        description: Company/Seller country code
                        example: CL
                      rule:
                        type: integer
                        description: Currently unused, it indicated the assigned rule
                        example: null
                      created_at:
                        type: string
                        description: Company/Seller creation date
                        example: '2025-03-25 19:35:21'
                      updated_at:
                        type: string
                        description: Company/Seller last data update date
                        example: '2025-03-25 19:35:21'
                      deleted_at:
                        type: string
                        description: Company/Seller deletion date
                        example: null
                      links:
                        type: array
                        items:
                          type: object
                          properties:
                            rel:
                              type: string
                              description: Relationship of the link to the resource.
                            href:
                              type: string
                              description: Resource URL.
                        example:
                          - rel: self
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23321
                          - rel: companies.employees
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23321/employees
                          - rel: companies.warehouses
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23321/warehouses
                          - rel: companies.carriers
                            href: >-
                              https://dev-san-andres-dot-easypoint-latam.appspot.com/api/s1/v1/companies/23321/carriers
        '401':
          description: api-key Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseEnvios401'
        '404':
          description: The current request is not defined by this API..
        '500':
          description: An error occurred.
  /v1/prices:
    get:
      tags:
        - Rates
      summary: Query rates
      description: >
        This endpoint allows querying shipping rates based on various
        parameters. 

        Supports queries by weight (kilograms - kg) and by distance (kilometers
        - km).
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: Client API key for authentication.
        - name: from_place_code
          in: query
          required: true
          schema:
            type: string
          description: >-
            Origin code (CL commune code, CO DANE code, PE ubigeo, MX postal
            code).
        - name: to_place_code
          in: query
          required: true
          schema:
            type: string
          description: >-
            Destination code (CL commune code, CO DANE code, PE ubigeo, MX
            postal code).
        - name: from_place
          in: query
          schema:
            type: string
          description: Origin place name, available for Chile, Colombia and Peru.
        - name: to_place
          in: query
          schema:
            type: string
          description: Destination place name, available for Chile, Colombia and Peru.
        - name: from_address
          in: query
          schema:
            type: string
          description: Delivery origin address. **Only for KM rates (Chile).**
        - name: to_address
          in: query
          schema:
            type: string
          description: Delivery destination address. **Only for KM rates (Chile).**
        - name: weight
          in: query
          required: true
          schema:
            type: number
          description: Product weight in kilograms (kg).
        - name: length
          in: query
          schema:
            type: number
          description: Product length in centimeters (cm).
        - name: width
          in: query
          schema:
            type: number
          description: Product width in centimeters (cm).
        - name: height
          in: query
          schema:
            type: number
          description: Product height in centimeters (cm).
        - name: volume
          in: query
          schema:
            type: number
          description: Product volume in cubic meters (m³), only for Chile.
        - name: type
          in: query
          schema:
            type: string
            example:
              - nextday
              - estandar
          description: Service category.
        - name: carrier
          in: query
          schema:
            type: string
          description: Filters by a specific carrier code.
        - name: service
          in: query
          schema:
            type: string
          description: >-
            Filters by a specific carrier service code. **Requires the `carrier`
            parameter.**
        - name: carriers[]
          in: query
          schema:
            type: array
            items:
              type: string
          explode: true
          description: |
            Filters by a list of carriers. Combined with `type`. 
            Ejemplo: `carriers[]=CARRIER1&carriers[]=CARRIER2`.
        - name: km_distance
          in: query
          schema:
            type: number
          description: Distance in kilometers.
        - name: declared_value
          in: query
          schema:
            type: number
          description: Declared product value. Required for CO
      x-codeSamples:
        - lang: CL
          label: Query by Addresses (KM) - Chile
          source: >
            curl -X GET
            "https://api.enviame.io/api/v1/prices?weight=1&length=1&width=1&height=1&to_address=HERNANDO%20DE%20AGUIRRE%20268%20OF%20202&from_address=Avenida%20Manquehue%20Norte%201337,%20Local%2011&from_place_code=13101&to_place_code=13101"
            \

            -H "x-api-key: YOUR_API_KEY"
          operationId: cl-tarifas-km-direcciones
          description: Query KM rates using addresses.
        - lang: CL
          label: Query by Distance (KM) - Chile
          source: >
            curl -X GET
            "https://api.enviame.io/api/v1/prices?weight=1&length=1&width=1&height=1&km_distance=3&from_place_code=13101&to_place_code=13101&carriers[]=CBFY&carriers[]=PDY"
            \

            -H "x-api-key: YOUR_API_KEY"
          operationId: cl-tarifas-km-distancia
          description: Query KM rates using distance.
        - lang: CL
          label: Query by KG - Chile
          source: >
            curl -X GET
            "https://api.enviame.io/api/v1/prices?from_place_code=13101&to_place_code=13101&from_place=santiago&to_place=santiago&type=nextday&carrier=BLX&service=priority&weight=1&length=1&width=1&height=1"
            \

            -H "x-api-key: YOUR_API_KEY"
          operationId: cl-tarifas-kg-cl
          description: Query KG rates in Chile.
        - lang: MX
          label: Query by KG - Mexico
          source: >
            curl -X GET
            "https://api.enviame.io/api/v1/prices?from_place_code=1000&to_place_code=4000&type=nextday&weight=1"
            \

            -H "x-api-key: YOUR_API_KEY"
          operationId: mx-tarifas-kg
          description: Query KG rates in Mexico.
        - lang: CO
          label: Query by KG - Colombia
          source: >
            curl -X GET
            "https://api.enviame.io/api/v1/prices?from_place_code=11001000&to_place_code=11001000&type=estandar&declared_value=1000&weight=1"
            \

            -H "x-api-key: YOUR_API_KEY"
          operationId: co-tarifas-kg
          description: Query KG rates in Colombia.
        - lang: PE
          label: Query by KG - Peru
          source: >
            curl -X GET
            "https://api.enviame.io/api/v1/prices?from_place_code=150101&to_place_code=150101&type=nextday&weight=1"
            \

            -H "x-api-key: YOUR_API_KEY"
          operationId: pe-tarifas-kg
          description: Query KG rates in Peru.
      responses:
        '200':
          description: Successful query
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ChilePriceResponse'
                  - $ref: '#/components/schemas/MexicoPriceResponse'
                  - $ref: '#/components/schemas/ColombiaPriceResponse'
                  - $ref: '#/components/schemas/PeruPriceResponse'
                  - $ref: '#/components/schemas/ChileKMDistanceResponse'
                  - $ref: '#/components/schemas/ChileKMAddressResponse'
              examples:
                CL_KG:
                  summary: Response for Chile (kg)
                  value:
                    status: success
                    data:
                      - carrier: BLX
                        name: BLUEXPRESS
                        weight: '1.00'
                        services:
                          - name: E-Commerce
                            code: priority
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 3838
                            price_formatted: $3.838
                    meta:
                      exec_seconds: 3.2198411490007857
                MX_KG:
                  summary: Response for Mexico (kg)
                  value:
                    status: success
                    data:
                      - carrier: SGM
                        name: SEGMAIL
                        weight: '1'
                        services:
                          - name: nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 78.11
                            price_formatted: $78.11
                      - carrier: IVY
                        name: IVOY
                        weight: '1'
                        services:
                          - name: NextDay
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 91
                            price_formatted: $91.00
                      - carrier: JTEX
                        name: JT EXPRESS MX
                        weight: '1'
                        services:
                          - name: nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 66
                            price_formatted: $66.00
                      - carrier: KRRI
                        name: KARRI
                        weight: '1'
                        services:
                          - name: nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 57
                            price_formatted: $57.00
                      - carrier: MXMV
                        name: MOOVA MEXICO
                        weight: '1'
                        services:
                          - name: NextDay
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 76
                            price_formatted: $76.00
                      - carrier: BSM
                        name: BIG SMART
                        weight: '1'
                        services:
                          - name: Express
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 3
                            transit_days: 3
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 59.73
                            price_formatted: $59.73
                      - carrier: PQEX
                        name: PAQUETE EXPRESS
                        weight: '1'
                        services:
                          - name: Standard
                            code: std
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 175
                            price_formatted: $175.00
                      - carrier: MXRB
                        name: RAPIBOY MEXICO
                        weight: '1'
                        services:
                          - name: NextDay
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 88
                            price_formatted: $88.00
                      - carrier: FDXM
                        name: FEDEX MEXICO
                        weight: '1'
                        services:
                          - name: Nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 123.21
                            price_formatted: $123.21
                      - carrier: MX99
                        name: 99MINUTOS MEXICO
                        weight: '1'
                        services:
                          - name: Nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 2
                            transit_days: 2
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 81
                            price_formatted: $81.00
                      - carrier: ESTS
                        name: ESTAFETA S
                        weight: '1'
                        services:
                          - name: nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 148
                            price_formatted: $148.00
                          - name: terrestre
                            code: terrestre
                            service_types:
                              - nextday
                            transit_days_base_value: 2
                            transit_days: 2
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 150
                            price_formatted: $150.00
                    meta:
                      exec_seconds: 5.398330127000008
                CO_KG:
                  summary: Response for Colombia (kg)
                  value:
                    status: success
                    data:
                      - carrier: SEC
                        name: SERVIENTREGA
                        weight: '1.00'
                        services:
                          - name: Mercancia Premier
                            code: premier
                            service_types:
                              - estandar
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: true
                            cost_freight_information:
                              original_price: 5536
                              route_charges_minimum_cost: 3850
                              route_charges_percentage_cost: 4
                              route_charges_cost_applied: 3850
                            group_by_carrier_service_type: null
                            price: 9386
                            price_formatted: $ 9.386
                    meta:
                      exec_seconds: 3.682671028000186
                PE_KG:
                  summary: Response for Peru (kg)
                  value:
                    status: success
                    data:
                      - carrier: UBN
                        name: URBANER
                        weight: '1.00'
                        services:
                          - name: Next Day
                            code: Nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 7.79
                            price_formatted: S/ 7.79
                      - carrier: NRX
                        name: NIREX
                        weight: '1.00'
                        services:
                          - name: nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 11.96
                            price_formatted: S/ 11.96
                      - carrier: PLM
                        name: PALMAS
                        weight: '1.00'
                        services:
                          - name: NextDay
                            code: Nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 10.26
                            price_formatted: S/ 10.26
                      - carrier: PEPT
                        name: PICKIT PERU
                        weight: '1.00'
                        services:
                          - name: NextDay a Punto
                            code: toPoint
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 7.68
                            price_formatted: S/ 7.68
                      - carrier: FLLY
                        name: FILLY
                        weight: '1.00'
                        services:
                          - name: NEXTDAY
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 9.14
                            price_formatted: S/ 9.14
                      - carrier: PEMV
                        name: MOOVA PERU
                        weight: '1.00'
                        services:
                          - name: NextDay
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 9.33
                            price_formatted: S/ 9.33
                      - carrier: PE99
                        name: 99MINUTOS PERÚ
                        weight: '1.00'
                        services:
                          - name: Nextday
                            code: nextDay
                            service_types:
                              - nextday
                            transit_days_base_value: 2
                            transit_days: 2
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 7.11
                            price_formatted: S/ 7.11
                      - carrier: OLVB
                        name: OLVA BETA
                        weight: '1.00'
                        services:
                          - name: dropoff
                            code: dropoff
                            service_types:
                              - nextday
                            transit_days_base_value: 2
                            transit_days: 2
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 6.95
                            price_formatted: S/ 6.95
                          - name: click&collect
                            code: click&collect
                            service_types:
                              - nextday
                            transit_days_base_value: 2
                            transit_days: 2
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 6.95
                            price_formatted: S/ 6.95
                          - name: nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 2
                            transit_days: 2
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 7.25
                            price_formatted: S/ 7.25
                      - carrier: TUK
                        name: TUKUY LOGÍSTICA
                        weight: '1.00'
                        services:
                          - name: Nextday
                            code: ENVIA
                            service_types:
                              - nextday
                            transit_days_base_value: 1
                            transit_days: 1
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 10
                            price_formatted: S/ 10.00
                      - carrier: SHFF
                        name: SHARF
                        weight: '1.00'
                        services:
                          - name: Nextday
                            code: nextday
                            service_types:
                              - nextday
                            transit_days_base_value: 2
                            transit_days: 2
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 7.49
                            price_formatted: S/ 7.49
                    meta:
                      exec_seconds: 3.3632383639996988
                CL_KM:
                  summary: Response for Chile (km) by distance
                  value:
                    status: success
                    data:
                      - carrier: PDY
                        name: PEDIDOSYA
                        km_distance: '3'
                        services:
                          - name: Envíos
                            code: priority
                            service_types:
                              - express
                            km_limit: 8
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 3332
                            price_formatted: $3.332
                      - carrier: CBFY
                        name: CABIFY
                        km_distance: '3'
                        services:
                          - name: Express
                            code: express
                            service_types:
                              - express
                            km_limit: 10
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 2538
                            price_formatted: $2.538
                    meta:
                      exec_seconds: 3.0827751139986503
                CL_KM_DIRECCIONES:
                  summary: Response for Chile (km) by addresses
                  value:
                    status: success
                    data:
                      - carrier: UBER
                        name: UBER
                        km_distance: '5.709'
                        services:
                          - name: 2 Ruedas
                            code: 2w
                            service_types:
                              - express
                            km_limit: 6
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 4584
                            price_formatted: $4.584
                          - name: 4 Ruedas
                            code: 4w
                            service_types:
                              - express
                            km_limit: 10
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 6172
                            price_formatted: $6.172
                      - carrier: CZCL
                        name: CHAZKI CL
                        km_distance: '5.709'
                        services:
                          - name: Express
                            code: express
                            service_types:
                              - express
                            km_limit: 15
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 4941
                            price_formatted: $4.941
                      - carrier: CBFY
                        name: CABIFY
                        km_distance: '5.709'
                        services:
                          - name: Express
                            code: express
                            service_types:
                              - express
                            km_limit: 10
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 3672
                            price_formatted: $3.672
                      - carrier: PDY
                        name: PEDIDOSYA
                        km_distance: '5.709'
                        services:
                          - name: Envíos
                            code: priority
                            service_types:
                              - express
                            km_limit: 8
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 5412
                            price_formatted: $5.412
                      - carrier: RPP
                        name: RAPPI
                        km_distance: '5.709'
                        services:
                          - name: Express
                            code: express
                            service_types:
                              - express
                            km_limit: 10
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 4819
                            price_formatted: $4.819
                      - carrier: FLSH
                        name: ENVIAFLASH
                        km_distance: '5.709'
                        services:
                          - name: EnviaFlash
                            code: enviaflash
                            service_types:
                              - express
                            km_limit: 10
                            transit_days_base_value: 0
                            transit_days: 0
                            cost_freight_included: false
                            cost_freight_information: {}
                            group_by_carrier_service_type: null
                            price: 5038
                            price_formatted: $5.038
                    meta:
                      exec_seconds: 6.58884954899986
        '400':
          description: Request error
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Server error
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - fail
          description: Status of the request
        message:
          type: string
          description: A message describing that the request failed
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: >-
                  A unique code for the error. This code can be used to look up
                  more information about the error in our documentation.
              description:
                type: string
                description: >-
                  A human-readable explanation of the error, specific to this
                  occurrence of the problem.
              field:
                type:
                  - string
                  - null
                description: >-
                  The field that caused the error. If the error is not specific
                  to a field, this property will be null.
              value:
                type:
                  - string
                  - null
                description: >-
                  The value of the field that caused the error. If the error is
                  not specific to a field, this property will be null.
    ErrorResponseEnvios401:
      type: object
      properties:
        data:
          type: string
          enum:
            - Unauthorized.
          description: 'invalid api-keys '
        code:
          type: integer
          enum:
            - 401
          description: Unauthorized
    SummaryNewEndpointResponse:
      type: object
      description: Response with found manifests.
      properties:
        status:
          type: string
          example: success
        data:
          type: array
          items:
            $ref: '#/components/schemas/SummaryNewEndpoint'
    SummaryNewEndpointDetailResponse:
      type: object
      description: Response with the found manifest.
      properties:
        status:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/SummaryNewEndpoint'
    SummaryNewEndpoint:
      type: object
      properties:
        id:
          type: integer
          example: 3263320
        shipper:
          $ref: '#/components/schemas/SummaryNewEndpointCompany'
        organization:
          $ref: '#/components/schemas/SummaryNewEndpointCompany'
        carrier_code:
          type: string
          example: SKN
        deliveries:
          type: array
          items:
            type: integer
          example:
            - 455258308
            - 455258356
            - 455258485
            - 455258535
            - 455258621
            - 455258828
        warehouse:
          type: object
          properties:
            id:
              type: integer
              example: 11634
            name:
              type: string
              example: Bodega Colo Colo
            code:
              type: string
              example: VR2
        status:
          type: object
          properties:
            id:
              type: integer
              example: 2
            code:
              type: string
              example: CLOSED
            name:
              type: string
              example: Cerrado
        group_code:
          type: string
          example: 2860_11634_SKN_2267_STANDARD
        files:
          type: object
          nullable: true
          example: null
        labels_url:
          type: string
          format: uri
          example: >-
            https://storage.googleapis.com/hs-carrier-deliveries-prod/202605/2860/skn_20260525_13_44_43_967939349.pdf
        summary_url:
          type: string
          format: uri
          example: >-
            https://storage.googleapis.com/hs-carrier-deliveries-prod/202605/2860/skn_20260525_8152443_3263320.pdf
        creator_user:
          type: string
          format: email
          example: jburaglia@bettercommerce.cl
        created_at:
          type: string
          format: date-time
          example: '2026-05-25T17:43:33.000Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-05-25T17:44:41.000Z'
        deleted_at:
          type: string
          format: date-time
          nullable: true
          example: null
        created_at_format:
          type: string
          example: 25-05-2026 17:43
        updated_at_format:
          type: string
          example: 25-05-2026 17:44
        services:
          type: array
          items:
            type: string
          example:
            - normal
        files_statuses:
          type: object
          properties:
            labels:
              $ref: '#/components/schemas/SummaryNewEndpointFileStatus'
            summary:
              $ref: '#/components/schemas/SummaryNewEndpointFileStatus'
    SummaryNewEndpointCompany:
      type: object
      properties:
        id:
          type: integer
          example: 2860
        name:
          type: string
          example: Ultimate Fitness
        code:
          type: string
          example: '2860'
        country:
          type: object
          properties:
            id:
              type: integer
              example: 1
            code:
              type: string
              example: CL
            name:
              type: string
              example: Chile
    SummaryNewEndpointFileStatus:
      type: object
      properties:
        url:
          type: string
          format: uri
          example: >-
            https://storage.googleapis.com/hs-carrier-deliveries-prod/202605/2860/skn_20260525_13_44_43_967939349.pdf
        status:
          type: string
          example: done
        date:
          type: string
          example: '2026-05-25 17:44:43'
        error:
          type: string
          nullable: true
          example: null
    UnauthorizedResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - fail
          description: Status of the request
        message:
          type: string
          description: >-
            A message describing that the request failed due to a lack of
            permissions
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: >-
                  A unique code for the error. This code can be used to look up
                  more information about the error in our documentation.
              description:
                type: string
                description: >-
                  A human-readable explanation of the error, specific to this
                  occurrence of the problem.
    ApiPudoSuccessfulResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        paging:
          type: object
          properties:
            page:
              type: integer
            limit:
              type: integer
            data_count:
              type: integer
            page_count:
              type: integer
        data:
          type: array
          minItems: 0
          items:
            type: object
            properties:
              code:
                type: string
              address:
                type: string
    ApiInvalidPudoTypeResponse:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              code:
                type: string
              message:
                type: string
    ApiPudoMissingRequiredQueryResponse:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              code:
                type: string
              message:
                type: string
    ApiPudoPlaceNotFoundResponse:
      type: object
      properties:
        status:
          type: string
        message:
          type: string
        data:
          type: object
          properties:
            place_name:
              type: string
    PriceService:
      type: object
      properties:
        name:
          type: string
          description: Service name
        code:
          type: string
          description: Service code
        service_types:
          type: array
          items:
            type: string
          description: Service category
        transit_days_base_value:
          type: integer
          description: Base transit days
        transit_days:
          type: integer
          description: Total transit days
        cost_freight_included:
          type: boolean
          description: Indicates whether freight cost is included
        cost_freight_information:
          type: object
          description: Additional information about freight costs
        group_by_carrier_service_type:
          type: string
          nullable: true
          description: Grouping by carrier service type
        price:
          type: number
          description: Service price
        price_formatted:
          type: string
          description: Price formatted with currency
    CarrierPricing:
      type: object
      properties:
        carrier:
          type: string
          description: Carrier code
        name:
          type: string
          description: Carrier name
        weight:
          type: string
          description: Delivery weight
        services:
          type: array
          items:
            $ref: '#/components/schemas/PriceService'
          description: List of available services
    PriceResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
          description: Response status
        data:
          type: array
          items:
            $ref: '#/components/schemas/CarrierPricing'
          description: List of carriers with their rates
        meta:
          type: object
          properties:
            exec_seconds:
              type: number
              description: Execution time in seconds
    ChilePriceResponse:
      allOf:
        - $ref: '#/components/schemas/PriceResponse'
        - description: Rates response for Chile
    MexicoPriceResponse:
      allOf:
        - $ref: '#/components/schemas/PriceResponse'
        - description: Rates response for Mexico
    ColombiaPriceResponse:
      allOf:
        - $ref: '#/components/schemas/PriceResponse'
        - description: Rates response for Colombia
        - properties:
            data:
              items:
                properties:
                  services:
                    items:
                      properties:
                        cost_freight_information:
                          properties:
                            original_price:
                              type: number
                            route_charges_minimum_cost:
                              type: number
                            route_charges_percentage_cost:
                              type: number
                            route_charges_cost_applied:
                              type: number
    PeruPriceResponse:
      allOf:
        - $ref: '#/components/schemas/PriceResponse'
        - description: Rates response for Peru
    PriceServiceKM:
      type: object
      allOf:
        - $ref: '#/components/schemas/PriceService'
        - type: object
          properties:
            km_limit:
              type: number
              description: Kilometer limit for the service
    CarrierPricingKM:
      type: object
      properties:
        carrier:
          type: string
          description: Carrier code
        name:
          type: string
          description: Carrier name
        km_distance:
          type: string
          description: Distance in kilometers
        services:
          type: array
          items:
            $ref: '#/components/schemas/PriceServiceKM'
          description: List of available services
    ChileKMResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
          description: Response status
        data:
          type: array
          items:
            $ref: '#/components/schemas/CarrierPricingKM'
          description: List of carriers with their per-kilometer rates
        meta:
          type: object
          properties:
            exec_seconds:
              type: number
              description: Execution time in seconds
    ChileKMDistanceResponse:
      allOf:
        - $ref: '#/components/schemas/ChileKMResponse'
        - description: KM rates response using distance for Chile
    ChileKMAddressResponse:
      allOf:
        - $ref: '#/components/schemas/ChileKMResponse'
        - description: KM rates response using addresses for Chile
    DeliveryRequest:
      type: object
      properties:
        shipping_order:
          type: object
          properties:
            n_packages:
              type: integer
              description: Required / Number of packages
            content_description:
              type: string
              description: Required / Product description
            imported_id:
              type: string
              description: Reference number
            order_price:
              type: float
              description: Required / Product value
            weight:
              type: float
              description: Required / Weight in kilos
            volume:
              type: integer
              description: >-
                Indicate the volume in cubic meters (m³). If not sent, the
                system will assign 1 by default.
            type:
              type: string
              description: Required / Indicates whether it is a delivery or a return
              default: delivery
        shipping_origin:
          type: object
          properties:
            warehouse_code:
              type: integer
              description: Required / Alphanumeric warehouse code
        shipping_destination:
          type: object
          properties:
            customer:
              type: object
              properties:
                name:
                  type: string
                  description: Required / Recipient name
                email:
                  type: string
                  description: Email
                phone:
                  type: integer
                  description: Recipient phone number
            delivery_address:
              type: object
              properties:
                place:
                  type: string
                  description: Commune / City / District / Colony
                full_address:
                  type: string
                  description: Full address
                information:
                  type: string
                  description: Additional destination information
                level1:
                  type: string
                  description: Province / Department / State
                level2:
                  type: string
                  description: Municipality
                level3:
                  type: string
                  description: City
                zip_code:
                  type: string
                  description: Zip code
                pickup_point_code:
                  type: string
                  description: Pickup point code
        dimensions:
          type: object
          properties:
            width:
              type: integer
              description: Width in cm
            height:
              type: integer
              description: Height in cm
            length:
              type: integer
              description: Length in cm
        carrier:
          type: object
          properties:
            carrier_code:
              type: string
              description: Carrier code
            carrier_service:
              type: string
              description: Service type
            tracking_number:
              type: integer
              description: Tracking number (if applicable)
        extra_fields:
          type: array
          description: Custom additional fields
          items:
            type: object
            properties:
              name:
                type: string
                description: Field name
                maxLength: 300
              value:
                type:
                  - string
                  - number
                  - object
                  - array
                  - 'null'
                description: Field value
                nullable: true
            required:
              - name
    DeliveryCreated:
      type: object
      description: Delivery created successfully.
      properties:
        status:
          type: string
          enum:
            - success
          description: Status of the request
        data:
          type: object
          properties:
            identifier:
              type: integer
              description: Unique delivery identifier
              example: 1581956
            imported_id:
              type: string
              description: Reference number
              example: '123'
            tracking_number:
              type: string
              description: Alphanumeric code provided by the carrier
              example: 298623F
            status:
              type: object
              properties:
                id:
                  type: integer
                  description: Enviame status ID
                  example: 5
                name:
                  type: string
                  description: Status name
                  example: Listo para despacho
                code:
                  type: string
                  description: Status code
                  example: CREATED
                info:
                  type: string
                  description: Comment assigned to the status
                  example: 'Ya creamos tu envío en: STARKEN - '
                created_at:
                  type: string
                  format: date-time
                  description: Status date
                  example: '2021-09-24 12:13:23'
            customer:
              type: object
              properties:
                full_name:
                  type: string
                  description: Recipient name
                  example: Cliente Feliz
                phone:
                  type: string
                  description: Phone
                  example: '987654321'
                email:
                  type: string
                  description: Email
                  example: prueba@enviame.io
            shipping_address:
              type: object
              properties:
                full_address:
                  type: string
                  description: Full address
                  example: Calle Falsa 123
                place:
                  type: string
                  description: Commune
                  example: Curicó
                type:
                  type: string
                  description: Destination type
                  example: home
            country:
              type: string
              description: Country code
              example: CL
            carrier:
              type: string
              description: Carrier
              example: STARKEN
            service:
              type: string
              description: Service
              example: priority
            label:
              type: object
              properties:
                PDF:
                  type: string
                  description: PDF link
                  example: https://storage.googleapis.com/etiqueta.pdf
                ZPL:
                  type: string
                  description: ZPL link
                  example: null
                PNG:
                  type: string
                  description: PNG link
                  example: null
            barcodes:
              type: string
              description: Barcode
              example: null
            deadline_at:
              type: string
              description: Commitment date
              example: null
            created_at:
              type: string
              description: Creation date
              example: '2021-09-24 12:13:22'
            updated_at:
              type: string
              description: Update date
              example: '2021-09-24 12:13:24'
            links:
              type: array
              items:
                type: object
                properties:
                  rel:
                    type: string
                  href:
                    type: string
              example:
                - rel: self
                  href: https://api.enviame.io/deliveries/1581956
                - rel: tracking
                  href: https://api.enviame.io/deliveries/1581956/tracking
                - rel: tracking-web
                  href: >-
                    https://stage.api.enviame.io/s2/companies/620/deliveries/1581956/tracking
    schemas-ErrorResponseEnvios401:
      type: object
      properties:
        status:
          type: string
          example: error
          enum:
            - Error.
        message:
          type: string
          enum:
            - Unauthorized. Invalid API Key.
          description: Invalid API key
          example: Unauthorized. Invalid API Key
    ErrorResponseEnvios500:
      type: object
      properties:
        status:
          type: string
          example: error
          enum:
            - Error.
        message:
          type: string
          enum:
            - Internal Server Error. Please try again later.
          example: Internal Server Error. Please try again later.
    ErrorResponseEnvios404:
      type: object
      properties:
        status:
          type: int
          example: 404
          enum:
            - 404
        message:
          type: string
          enum:
            - >-
              No existe una compa\u00f1ia con el identificador xxxx con el id
              indicado
          example: >-
            No existe una compa\u00f1ia con el identificador xxxx con el id
            indicado
    ErrorResponseEnvios404verenvio:
      type: object
      properties:
        code:
          type: int
          example: 404
          enum:
            - 404
        message:
          type: string
          enum:
            - No existe ninguna instancia de delivery con el id indicado
          example: No existe ninguna instancia de delivery con el id indicado
    return.create.request:
      type: object
      required:
        - origin
        - destination
        - order
        - carrier
      properties:
        origin:
          description: Return origin (home or PUDO/agency)
          oneOf:
            - type: object
              required:
                - place
                - full_address
                - contact
              properties:
                place:
                  type: string
                  description: Pickup commune/city/district
                full_address:
                  type: string
                  description: Full origin address
                information:
                  type: string
                  nullable: true
                  description: Address complement
                contact:
                  type: object
                  required:
                    - name
                    - email
                  properties:
                    name:
                      type: string
                    phone:
                      type: string
                      nullable: true
                    email:
                      type: string
            - type: object
              required:
                - type
                - pudo_code
                - contact
              properties:
                type:
                  type: string
                  enum:
                    - pudo_or_agency_legacy
                pudo_code:
                  type: string
                contact:
                  type: object
                  required:
                    - name
                    - email
                  properties:
                    name:
                      type: string
                    phone:
                      type: string
                      nullable: true
                    email:
                      type: string
        destination:
          description: Return destination (home or warehouse)
          oneOf:
            - type: object
              required:
                - place
                - full_address
                - contact
              properties:
                place:
                  type: string
                full_address:
                  type: string
                information:
                  type: string
                  nullable: true
                contact:
                  type: object
                  required:
                    - name
                    - email
                  properties:
                    name:
                      type: string
                    phone:
                      type: string
                      nullable: true
                    email:
                      type: string
            - type: object
              required:
                - code_warehouse
              properties:
                code_warehouse:
                  type: string
                  description: Destination warehouse code
        order:
          type: object
          required:
            - imported_id
            - type
            - n_packages
            - packages
          properties:
            imported_id:
              type: string
            type:
              type: string
              enum:
                - return
            n_packages:
              type: integer
            packages:
              type: array
              items:
                type: object
                required:
                  - id
                  - price
                  - description
                  - weight
                  - volume
                properties:
                  id:
                    type:
                      - integer
                      - string
                  price:
                    type: string
                    description: Declared value
                  description:
                    type: string
                  weight:
                    type: string
                  volume:
                    type: string
        carrier:
          type: object
          required:
            - code
            - service
          properties:
            code:
              type: string
            service:
              type: string
            type:
              type: string
              nullable: true
            attribute:
              type: string
              nullable: true
            attributes:
              type: array
              items:
                type: string
              nullable: true
        extra_fields:
          type: object
          description: Custom additional fields
          additionalProperties:
            type:
              - string
              - number
              - object
              - array
              - 'null'
            description: Field value
            nullable: true
