openapi: 3.0.3
info:
  description: >-
    ## Summary
     ### Introduction
     - **Overview**: 
    The REVER ADMIN API provides seamless integration for managing returns
    through three main categories: Reverse Logistics, Processes, and Settings.
     - **Logistics**: Handles all operations related to package returns, including shipment tracking, warehouse logistics, and return labels for items sent back to the eCommerce warehouse. 
     - **Processes**: Manages return workflows, including return statuses, item inspections, and actions that can be taken on a return, such as refunds, exchanges, or inspections. 
     - **Settings**: Contains configuration information REVER uses to execute return processes, including return rules, time limits, and warehouse preferences. 
     ## OpenAPI Specification
     You can download the OpenAPI specification file [here](https://api.byrever.com/v1/docs/openapi.yaml) to generate your client code.


    this API is meant to be used for returns that are already created or
    processed. The API is not meant to be used to start returns from the
    customer portal. For integrating with your own portal please take a look at
    the Storefront API.



    ## E-commerce IDs and Groups
     Most commonly, you will only need to use the e-commerce ID provided during onboarding.
     However, if you need to manage multiple e-commerce stores simultaneously, a group ID is required.
     An e-commerce group is an identifier that groups multiple e-commerce stores that are managed together.
     Typically, these are different brands belonging to the same parent company.


    ## Authentication
     The REVER Admin API uses API key authentication.

     ### Authenticating via API Key
     This authentication method is primarily used for server-to-server (unattended) integrations. You must request an API key through your account manager.
    **The API key must be kept secure and confidential**, do not share it with
    anyone.

     To authenticate a request using an API key, include the header **x-rever-api-key**. Example: `x-rever-api-key: 87bf223499abeef`


    ## Rate Limiting
     The API implements rate limiting. If you receive a 429 error response, please wait a few seconds before retrying.
  title: REVER Admin API
  version: 1.0.0
tags:
  - description: >-
      Collection of methods that provide logistics services including CRUD
      operations

      for logistics orders, pickups, etc.

      Also handles logistics-related files like shipping labels.
    name: Logistics
  - description: >-
      Collection of methods for managing return processes. It includes CRUD
      operations and status updates.
    name: Processes
  - description: >-
      Collection of methods for managing e-commerce configurations. It includes
      GET operations for e-commerce stores, warehouses, and other settings.
    name: Settings
  - description: Public endpoints for creating/importing returns.
    name: Returns
paths:
  /v1/configs/branding/{ecommerce_id}:
    get:
      description: Endpoint for retrieving branding configuration
      operationId: FindBranding
      parameters:
        - description: The ID of the e-commerce store. Optional.
          in: path
          name: ecommerce_id
          required: true
          schema:
            type: string
        - description: The URL path identifier for the e-commerce store. Optional.
          in: query
          name: slug
          schema:
            type: string
        - description: >-
            The group identifier for the e-commerce store. Multiple stores can
            share the same group. Optional.
          in: query
          name: group
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.Branding'
          description: OK
      tags:
        - Settings
  /v1/configs/ecommerces/{ecommerce_id}:
    get:
      description: endpoint for finding Ecommerce model
      operationId: FindEcommerce
      parameters:
        - description: The id of the e-commerce.
          in: path
          name: ecommerce_id
          required: true
          schema:
            type: string
        - description: The path of an URL identifying the e-commerce. Optional.
          in: query
          name: slug
          schema:
            type: string
        - description: >-
            The group of the e-commerce. Several e-commerces can have the same
            group. Optional.
          in: query
          name: group
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.Ecommerce'
          description: OK
      tags:
        - Settings
  /v1/configs/ecommerces/{ecommerce_id}/exchangesconditions/:
    get:
      description: endpoint for finding ExchangeConditions model
      operationId: FindExchangeConditions
      parameters:
        - description: The id of the e-commerce. Optional.
          in: path
          name: ecommerce_id
          required: true
          schema:
            type: string
        - description: The path of an URL identifying the e-commerce. Optional.
          in: query
          name: slug
          schema:
            type: string
        - description: >-
            The group of the e-commerce. Several e-commerces can have the same
            group. Optional.
          in: query
          name: group
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.ExchangeConditions'
          description: OK
      tags:
        - Settings
  /v1/configs/ecommerces/{ecommerce_id}/exchangeorders/:
    get:
      description: endpoint for finding ExchangeOrder model
      operationId: FindExchangeOrder
      parameters:
        - description: The id of the e-commerce. Optional.
          in: path
          name: ecommerce_id
          required: true
          schema:
            type: string
        - description: The path of an URL identifying the e-commerce. Optional.
          in: query
          name: slug
          schema:
            type: string
        - description: >-
            The group of the e-commerce. Several e-commerces can have the same
            group. Optional.
          in: query
          name: group
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.ExchangeOrderWithEcommerce'
          description: OK
      tags:
        - Settings
  /v1/configs/ecommerces/{ecommerce_id}/logistics/:
    get:
      description: endpoint for finding LogisticSetting model
      operationId: FindLogisticSetting
      parameters:
        - description: The id of the e-commerce. Optional.
          in: path
          name: ecommerce_id
          required: true
          schema:
            type: string
        - description: The path of an URL identifying the e-commerce. Optional.
          in: query
          name: slug
          schema:
            type: string
        - description: >-
            The group of the e-commerce. Several e-commerces can have the same
            group. Optional.
          in: query
          name: group
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.LogisticSetting'
          description: OK
      tags:
        - Settings
  /v1/configs/ecommerces/{ecommerce_id}/refunds:
    get:
      description: FindRefundConfiguration
      operationId: FindRefundConfiguration
      parameters:
        - description: The path of an URL identifying the e-commerce. Optional.
          in: query
          name: slug
          schema:
            type: string
        - description: The id of the e-commerce. Optional.
          in: path
          name: ecommerce_id
          required: true
          schema:
            type: string
        - description: >-
            The group of the e-commerce. Several e-commerces can have the same
            group. Optional.
          in: query
          name: group
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.FindRefundConfigurationResponse'
          description: OK
      tags:
        - Settings
  /v1/configs/ecommerces/{ecommerce_id}/returnconditions/:
    get:
      description: endpoint for finding LogisticsSettings model
      operationId: FindReturnProcessConditions
      parameters:
        - description: The id of the e-commerce. Optional.
          in: path
          name: ecommerce_id
          required: true
          schema:
            type: string
        - description: The path of an URL identifying the e-commerce. Optional.
          in: query
          name: slug
          schema:
            type: string
        - description: >-
            The group of the e-commerce. Several e-commerces can have the same
            group. Optional.
          in: query
          name: group
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.ReturnProcessConditions'
          description: OK
      tags:
        - Settings
  /v1/configs/ecommerces/{ecommerce_id}/warehouses:
    get:
      description: endpoint for finding Warehouses by ecommerce id
      operationId: FindWarehousesByEcommerce
      parameters:
        - description: The id of the e-commerce. Optional.
          in: path
          name: ecommerce_id
          required: true
          schema:
            type: string
        - description: The path of an URL identifying the e-commerce. Optional.
          in: query
          name: slug
          schema:
            type: string
        - description: >-
            The group of the e-commerce. Several e-commerces can have the same
            group. Optional.
          in: query
          name: group
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.Warehouses'
          description: OK
      tags:
        - Settings
  /v1/configs/ecommerces/{ecommerce_id}/warehouses/{id}:
    get:
      description: endpoint for finding Warehouse model
      operationId: FindWarehouse
      parameters:
        - description: ID
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: EcommerceID
          in: path
          required: true
          name: ecommerce_id
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.Warehouse'
          description: OK
      tags:
        - Settings
  /v1/processes/search:
    get:
      description: Search for return processes
      operationId: SearchReturnProcesses
      parameters:
        - in: query
          name: page
          description: The page number to return
          schema:
            format: int32
            type: integer
        - in: query
          name: order_id
          description: >-
            The order ID to search for, this is the order ID from the e-commerce
            not the customer order ID
          schema:
            type: string
        - in: query
          name: status
          description: The status of the return process
          schema:
            type: string
        - in: query
          name: customer_email
          description: The email of the customer
          schema:
            type: string
        - in: query
          name: order_number
          description: >-
            The order number to search for, this is the order number the user
            received in their email
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.GetReturnSummariesResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}:
    get:
      description: Get a Return Summary
      operationId: GetReturnSummary
      parameters:
        - in: path
          name: process_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.GetReturnSummaryResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}/patch:
    patch:
      description: Updates a return process via a PATCH (updating only certain fields)
      operationId: PatchReturnProcess
      parameters:
        - description: ID of the process to be updated. Required.
          in: path
          name: process_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pb.PatchReturnProcessRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.PatchReturnProcessResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}/mark-as-refunded:
    post:
      description: Marks the line items of the request as refunded
      operationId: MarkAsRefunded
      parameters:
        - description: gets the reverse delivery info
          in: path
          name: process_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pb.MarkAsRefundedRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.MarkAsRefundedResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}/reviews/:
    post:
      description: Adds a review (approve/decline/missing) to a given process
      operationId: AddReview
      parameters:
        - description: ID of the process in where the review is being added. Required.
          in: path
          name: process_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pb.AddReviewRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.AddReviewResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}/shipping_status:
    post:
      operationId: UpdateLKSS
      parameters:
        - description: gets the reverse delivery info
          in: path
          name: process_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/opspb.UpdateLKSSRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/opspb.UpdateLKSSResponse'
          description: OK
      tags:
        - Logistics
  /v1/public/returns/{ecommerce_id}/import_return:
    post:
      tags:
        - Processes
      summary: Creates a Return
      description: >-
        Creates a new return record using a valid reason name obtained from the
        'Get Return Reasons' endpoint.
      operationId: ImportReturn
      security:
        - ApiKeyAuth: []
      parameters:
        - name: ecommerce_id
          in: path
          description: ID of the ecommerce store where the return is being created.
          required: true
          schema:
            type: string
            example: ecommerce_id
      requestBody:
        description: Details of the return to be created.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_printed_order_id:
                  type: string
                email:
                  type: string
                  format: email
                line_items:
                  type: array
                  items:
                    type: object
                    properties:
                      line_item_id:
                        type: string
                        description: Is the Platform ID, not the REVER line item ID.
                      product_return_reason:
                        type: string
                        description: >-
                          Reason name. Retrieve available reasons via GET
                          /v1/public/configs/return-reasons/find (Storefront
                          API) and use the 'name' field from that response.
                      quantity:
                        type: integer
                user_preferred_lang:
                  type: string
            example:
              customer_printed_order_id: ORDER-1001
              email: user@example.com
              line_items:
                - line_item_id: '9876543210987'
                  product_return_reason: NOT_AS_EXPECTED
                  quantity: 1
              user_preferred_lang: EN
      responses:
        '200':
          description: OK - The return was created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  return_id:
                    type: string
                example:
                  status: success
                  return_id: ret_123456789
        '400':
          description: Bad Request - The request body is invalid.
        '401':
          description: Unauthorized - The API key is missing or invalid.
  /v1/ops/ecommerce/review:
    post:
      tags:
        - Processes
      summary: Submit reviews for all items in a return process
      description: >-
        Notify REVER when a return has been reviewed. Reviews must cover every
        line item of the process.


        Notes:

        - Reviews of a return process must be done in full; unreviewed items
        will block processing.

        - If an expected item was not received, set status: "MISSING".

        - Optionally override the refund amount with `refund_override`.
      operationId: SubmitProcessReviews
      security:
        - ApiKeyAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/opspb.ReviewItemsRequest'
            example:
              process_id: retp_eei390jfio39jcco
              refund_override:
                amount:
                  amount: '45.07'
                  currency_code: EUR
              reviews:
                - line_item_id: abc123-lineitem
                  location_id: '84954839489348'
                  reject_reason: Item damaged during return
                  rever_id: review789
                  should_restock: true
                  show_reject_reason: true
                  status: DECLINED
                  timestamp: '2025-04-16T14:30:00Z'
                  user: warehouse-001
                - line_item_id: def456-lineitem
                  reject_reason: ''
                  rever_id: review102
                  should_restock: false
                  show_reject_reason: false
                  status: MISSING
                  timestamp: '2025-04-16T15:00:00Z'
                  user: store 123
      responses:
        '200':
          description: OK - Reviews submitted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/opspb.ReviewItemsResponse'
        '400':
          description: Bad Request - The request body is invalid.
        '401':
          description: Unauthorized - The API key is missing or invalid.
  /v1/processes/{process_id}/label:
    get:
      description: |-
        GetLabelURL creates a URL to download the label 
         file associated to the given process_id
      operationId: GetLabelURL
      parameters:
        - description: Id of the process to identify the label from
          in: path
          name: process_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logistics.GetPresignedURLLabelResponse'
          description: OK
      tags:
        - Logistics
  /v1/processes/{process_id}/logistics:
    get:
      description: Get the reverse delivery information of a Return Process
      operationId: GetReverseDeliveryInfo
      parameters:
        - in: path
          name: process_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.GetLogisticsSummaryResponse'
          description: OK
      tags:
        - Logistics
    post:
      description: Updates the logistics fields associated to a given return process
      operationId: UpdateLogistics
      parameters:
        - description: The process ID to update. Required.
          in: path
          name: process_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pb.UpdateLogisticsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.UpdateLogisticsResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}/pickup:
    post:
      description: |-
        Creates a pickup for a given process_id, customer and address
         A logistic order must be created prior requesting a pickup
          Must specify the provider and carrier to be used to create the pickup:
         - Returns UNIMPLEMENTED (gRPC code 12) if the provider is `OPS`,
         meaning it didn't generated any action. 
         - Returns InvalidArgument (gRPC code 3) if the combination of 
         `return-method`, `provider`and `carrier` is not supported.
      operationId: CreatePickup
      parameters:
        - description: gets the reverse delivery info
          in: path
          name: process_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/logistics.CreatePickupRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logistics.CreatePickupResponse'
          description: OK
      tags:
        - Logistics
  /v1/processes/{process_id}/documents:
    get:
      description: Returns all the documents uploaded for a given return process
      operationId: GetReturnDocuments
      parameters:
        - in: path
          name: process_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.GetReturnDocumentsResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}/authorize:
    post:
      operationId: AuthorizeReturnProcess
      parameters:
        - description: gets the reverse delivery info
          in: path
          name: process_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/opspb.SubmitAuthorizationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/opspb.SubmitAuthorizationResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}/authorization/status:
    get:
      description: >-
        GetAuthorizationStatus returns the authorization status and details of a
        process
      operationId: GetAuthorizationStatus
      parameters:
        - in: path
          name: process_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pb.GetAuthorizationStatusResponse'
          description: OK
      tags:
        - Processes
  /v1/processes/{process_id}/logistics/:
    post:
      description: |-
        SaveManuallyCreatedLogisticOrder creates a logistic order associated
         to a given process_id, and saves the label file in the database
      operationId: CreateReverseDelivery
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/logistics.SaveManuallyCreatedLogisticOrderRequest
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logistics.SaveLogisticOrderResponse'
          description: OK
      tags:
        - Logistics
    put:
      description: |-
        Creates a logistic order for a given process_id, customer and address.
         Must specify the provider and carrier to be used to create the pickup. 
         - Returns UNIMPLEMENTED (gRPC code 12) if the provider is `OPS`,
         meaning it didn't generated any action. 
         - Returns InvalidArgument (gRPC code 3) if the combination of 
         `return-method`, `provider`and `carrier` is not supported.
      operationId: CreateOrderV2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/logistics.CreateLogisticOrderRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/logistics.SaveLogisticOrderResponse'
          description: OK
      tags:
        - Logistics
components:
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
  schemas:
    logistics.CarrierInfo:
      properties:
        drop_off_point_url:
          type: string
        name:
          type: string
      type: object
    logistics.CreateLogisticOrderRequest:
      properties:
        carrier:
          description: |-
            Carrier to be used for generating the pickup (DHL, UPS, Correos...)
            kwown & available for the given provider
          type: string
        customer:
          allOf:
            - $ref: '#/components/schemas/models.Customer'
          description: Customer personal data
        customer_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: Origin address of the logistic order
        ecommerce_group:
          description: ecommerce group
          type: string
        ecommerce_id:
          description: Ecommerce associated to this logistic order
          type: string
        ecommerce_order_id:
          description: >-
            Id of the original ecommerce order (if any) associated to this
            shipping
          type: string
        ecommerce_warehouse_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: destination address of the logistic order
        order_number:
          description: |-
            Id of the original order (if any) associated to this shipping
            E-commerces uses this to match the original order when the
            package arrives to the warehouse
          type: string
        pickup_ranges:
          description: Pick-up time ranges. Only required for return_type = PICKUP
          items:
            enum:
              - NO_RANGE
              - RANGE_8_TO_12
              - RANGE_12_TO_16
              - RANGE_16_TO_20
            format: enum
            type: string
          type: array
        process_id:
          description: Id of the process that the pickup is associated to
          type: string
        provider:
          description: Provider to be used for generating the pickup (SendCloud, OPS, etc).
          type: string
        return_type:
          description: Return method associated to the logistic order (PICKUP, DROP_OFF)
          enum:
            - NO_RETURN_METHOD
            - HOME_PICK_UP
            - DROP_OFF_POINT
            - DELIVERY_PICKUP
            - IN_STORE
          format: enum
          type: string
        settings:
          allOf:
            - $ref: '#/components/schemas/logistics.LogisticSettings'
          description: deprecated
        weight_in_grams:
          description: |-
            protolint:disable:next FIELD_NAMES_EXCLUDE_PREPOSITIONS
            Weight of the total sum of packags in grams
          format: int32
          type: integer
      type: object
    logistics.CreatePickupRequest:
      properties:
        carrier:
          description: |-
            Carrier to be used for generating the pickup (DHL, UPS, Correos...)
            must be available for the given provider
          type: string
        customer:
          allOf:
            - $ref: '#/components/schemas/models.Customer'
          description: Customer personal data
        ecommerce_id:
          description: Ecommerce associated to this logistic order
          type: string
        pickup_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: Address where the package is going to be picked up
        pickup_ranges:
          description: Preferred times for the pickup a the customer address
          items:
            enum:
              - NO_RANGE
              - RANGE_8_TO_12
              - RANGE_12_TO_16
              - RANGE_16_TO_20
            format: enum
            type: string
          type: array
        process_id:
          description: Id of the process that the pickup is associated to
          type: string
        provider:
          description: Provider to be used for generating the pickup (SendCloud, OPS, etc).
          type: string
        settings:
          allOf:
            - $ref: '#/components/schemas/logistics.LogisticSettings'
          description: deprecated
      type: object
    logistics.CreatePickupResponse:
      description: Response of the CreatePickup method
      properties:
        pickup_order:
          allOf:
            - $ref: '#/components/schemas/logistics.PickupOrder'
          description: Pickup order created if any
      type: object
    logistics.Document:
      properties:
        document_type:
          enum:
            - DOCUMENT_TYPE_UNSPECIFIED
            - DOCUMENT_TYPE_LABEL
            - DOCUMENT_TYPE_RETURN_INSTRUCTIONS
            - DOCUMENT_TYPE_DELIVERY_NOTE
          format: enum
          type: string
        file_extension:
          enum:
            - DOCUMENT_EXTENSION_UNSPECIFIED
            - DOCUMENT_EXTENSION_PDF
            - DOCUMENT_EXTENSION_PNG
            - DOCUMENT_EXTENSION_JPG
          format: enum
          type: string
        path:
          type: string
        process_id:
          type: string
      type: object
    logistics.FindAllDocumentsByProcessIdResponse:
      properties:
        documents:
          description: List of documents
          items:
            $ref: '#/components/schemas/logistics.Document'
          type: array
      type: object
    logistics.GeneratePresignedUrlResponse:
      properties:
        presigned_url:
          description: file data (in chunks - stream)
          type: string
      type: object
    logistics.GetCarrierInfoResponse:
      properties:
        carrier_info:
          $ref: '#/components/schemas/logistics.CarrierInfo'
      type: object
    logistics.GetLogisticOrderResponse:
      properties:
        order:
          allOf:
            - $ref: '#/components/schemas/models.LogisticOrder'
          description: logistic order retrieved
      type: object
    logistics.GetPresignedURLLabelResponse:
      properties:
        url:
          description: URL to download the label file
          type: string
      type: object
    logistics.GetProcessInfoResponse:
      properties:
        process_info:
          $ref: '#/components/schemas/logistics.ProcessInfo'
      type: object
    logistics.IsPickupAvailableRequest:
      properties:
        carrier:
          description: Carrier
          type: string
        pickup_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: Address where the package is going to be picked up
        provider:
          description: Provider
          type: string
      type: object
    logistics.IsPickupAvailableResponse:
      properties:
        is_pickup_available:
          description: Is pickup available
          type: boolean
        pickup_ranges:
          description: Pick-up time ranges
          items:
            enum:
              - NO_RANGE
              - RANGE_8_TO_12
              - RANGE_12_TO_16
              - RANGE_16_TO_20
            format: enum
            type: string
          type: array
      type: object
    logistics.LogisticConfig:
      description: LogisticConfig is deprecated
      properties:
        carrier:
          description: carrier
          type: string
        provider:
          description: provider
          type: string
      type: object
    logistics.LogisticContract:
      description: LogisticContract model
      properties:
        carrier:
          description: Carrier
          type: string
        contract_id:
          description: ContractID
          type: string
        ecommerce_id:
          description: EcommerceID
          type: string
        provider:
          description: Provider
          type: string
      type: object
    logistics.LogisticContractsRes:
      properties:
        contracts:
          items:
            $ref: '#/components/schemas/logistics.LogisticContract'
          type: array
      type: object
    logistics.LogisticSettings:
      description: |-
        LogisticSettings is deprecated
        this message is going to be removed when
        the dynamic return methods are fully rolled out
      properties:
        logistic_config:
          description: protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
          items:
            $ref: '#/components/schemas/logistics.LogisticConfig'
          type: array
        return_method:
          description: Return method associated to the logistic order (PICKUP, DROP_OFF)
          enum:
            - NO_RETURN_METHOD
            - HOME_PICK_UP
            - DROP_OFF_POINT
            - DELIVERY_PICKUP
            - IN_STORE
          format: enum
          type: string
      type: object
    logistics.ManualLogisticOrder:
      properties:
        carrier:
          description: >-
            Carrier within the provider that was used to generate the logistic
            order

            Example: DHL
          type: string
        from:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: |-
            protolint:disable:next FIELD_NAMES_EXCLUDE_PREPOSITIONS
            Origin address of the logistic order
        process_id:
          description: Id of the process that the logistic order is associated to
          type: string
        provider:
          description: |-
            Provider that was used to generate the logistic order
            Example: OPS
          type: string
        return_method:
          description: Return method associated to the logistic order (PICKUP, DROP_OFF)
          enum:
            - NO_RETURN_METHOD
            - HOME_PICK_UP
            - DROP_OFF_POINT
            - DELIVERY_PICKUP
            - IN_STORE
          format: enum
          type: string
        to:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: |-
            protolint:disable:next FIELD_NAMES_EXCLUDE_PREPOSITIONS
            Destination address of the logistic order
        tracking_id:
          description: Tracking ID that was generated for the logistic order
          type: string
        tracking_url:
          description: Tracking URL that was generated for the logistic order
          type: string
      type: object
    logistics.PickupOrder:
      description: A pickup order created in the system
      properties:
        carrier:
          description: Carrier that was used to geenrate the pickup
          type: string
        id:
          description: Platform specific id of the pickup
          type: string
        pickup_range:
          allOf:
            - $ref: '#/components/schemas/logistics.PickupRange'
          description: Pickup Range
        provider:
          description: Provider that was used to generate the pickup
          type: string
      type: object
    logistics.PickupRange:
      properties:
        from:
          description: Start time of the pickup range
          format: date-time
          type: string
        to:
          description: End time of the pickup range
          format: date-time
          type: string
      type: object
    logistics.ProcessInfo:
      properties:
        process_id:
          type: string
        warehouse_id:
          type: string
      type: object
    logistics.SaveDocumentRequest:
      properties:
        document:
          description: The content of the document file, base64 encoded
          format: bytes
          type: string
        document_extension:
          description: |-
            The extension of the document file, just 3 letters
            Only "pdf", "png" and "jpg" are allowed
          enum:
            - DOCUMENT_EXTENSION_UNSPECIFIED
            - DOCUMENT_EXTENSION_PDF
            - DOCUMENT_EXTENSION_PNG
            - DOCUMENT_EXTENSION_JPG
          format: enum
          type: string
        document_type:
          description: Document type
          enum:
            - DOCUMENT_TYPE_UNSPECIFIED
            - DOCUMENT_TYPE_LABEL
            - DOCUMENT_TYPE_RETURN_INSTRUCTIONS
            - DOCUMENT_TYPE_DELIVERY_NOTE
          format: enum
          type: string
        process_id:
          description: Id of the process to identify the label from
          type: string
      type: object
    logistics.SaveDocumentResponse:
      type: object
    logistics.SaveLogisticContractReq:
      description: LogisticContract save request
      properties:
        carrier:
          description: Carrier
          type: string
        contract_id:
          description: ContractID
          type: string
        ecommerce_id:
          description: EcommerceID
          type: string
        provider:
          description: Provider
          type: string
        user:
          description: User
          type: string
      type: object
    logistics.SaveLogisticContractRes:
      description: LogisticContract Save response
      type: object
    logistics.SaveLogisticOrderResponse:
      properties:
        order:
          allOf:
            - $ref: '#/components/schemas/models.LogisticOrder'
          description: logistic order created
      type: object
    logistics.SaveManuallyCreatedLogisticOrderRequest:
      properties:
        label:
          description: The content of the label file, base64 encoded
          format: bytes
          type: string
        label_extension:
          description: |-
            The extension of the label file, just 3 letters
            Only "pdf", "png" and "jpg" are allowed
          type: string
        order:
          allOf:
            - $ref: '#/components/schemas/logistics.ManualLogisticOrder'
          description: The logistic order data with the process_id
      type: object
    logistics.SaveProcessInfoRequest:
      properties:
        process_info:
          $ref: '#/components/schemas/logistics.ProcessInfo'
      type: object
    logistics.SaveProcessInfoResponse:
      type: object
    logistics.SendCloudContractTesterRequest:
      properties:
        carrier:
          type: string
        contract_id:
          type: string
        from_country:
          type: string
        is_return:
          type: boolean
        to_country:
          type: string
      type: object
    logistics.SendCloudContractTesterResponse:
      properties:
        services:
          items:
            $ref: '#/components/schemas/logistics.SendcloudService'
          type: array
      type: object
    logistics.SendcloudService:
      properties:
        id:
          type: string
        name:
          type: string
      type: object
    models.Address:
      description: |-
        Address 
         @Description generic address used in many scenarios
         @name api.Address
      properties:
        address_line_1:
          type: string
        address_line_2:
          type: string
        city:
          type: string
        company:
          type: string
        country:
          type: string
        country_code:
          type: string
        email:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        phone:
          type: string
        postcode:
          type: string
        rever_id:
          description: Unique ID in the rever platform
          type: string
        state_province:
          type: string
        state_province_code:
          type: string
      type: object
    models.Comment:
      description: Comments data
      properties:
        comment_type:
          description: Comment type
          type: string
        extra:
          description: Extra comments/data field text -- any format
          type: string
        is_manual:
          description: >-
            If the comment is manual (by a person) or automatic (by the
            worfklow)
          type: boolean
        rever_id:
          description: Id of the comment in rever system
          type: string
        text:
          description: Comment text -- might have markdown text
          type: string
        timestamp:
          description: Time of the commant
          format: date-time
          type: string
        user:
          description: User that is related to the comment
          type: string
      type: object
    models.Customer:
      description: |-
        Customer
        Important! the alias at the end is for API docs generation
        @Description A generic customer in the Rever platform
        @name api.Customer
      properties:
        email:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        rever_id:
          description: Unique ID in the rever platform
          type: string
      type: object
    models.LineItemReview:
      description: >-
        LineItemReview represents each verification of an individual item of a
        line item
      properties:
        line_item_id:
          description: Line item ID
          type: string
        location_id:
          description: Location ID where the item was restocked
          type: string
        reject_reason:
          description: Reason in case the review is a Reject
          type: string
        rever_id:
          description: ID of the review in our system
          type: string
        should_restock:
          description: >-
            Should Restock indicates if the item should be restocked in the
            ecommerce platform
          type: boolean
        show_reject_reason:
          description: Show reject reason to the user
          type: boolean
        status:
          description: Status of the reviewed item
          type: string
        timestamp:
          description: Time of the review
          format: date-time
          type: string
        user:
          description: User that completed the review
          type: string
      type: object
    models.LogisticOrder:
      properties:
        carrier:
          type: string
        currency_code:
          type: string
        id:
          description: Logistic Order ID
          type: string
        price:
          format: int32
          type: integer
        provider:
          type: string
        shipments:
          items:
            $ref: '#/components/schemas/models.Shipment'
          type: array
      type: object
    models.MoneyFormat:
      description: >-
        MoneyFormat describes how to deal with money fields (total, price..)

        Important! the alias at the end is for API docs generation

        @Description describes how amounts should be displayed in the client
        side

        @name api.MoneyFormat
      properties:
        amount_multiplied_by:
          format: int32
          type: integer
        currency:
          description: ISO format (EUR, JPY, USD...)
          type: string
        currency_symbol:
          type: string
        decimal_separator:
          type: string
        display_prices_with_taxes:
          type: boolean
        is_currency_left_position:
          type: boolean
        thousand_separator:
          type: string
        visible_number_of_decimals:
          description: 'Deprecated: use GetNumberOfDecimalsStored method instead'
          format: int32
          type: integer
      type: object
    models.Package:
      properties:
        id:
          type: string
        label:
          type: string
        shipment_id:
          type: string
        weight_in_grams:
          format: int32
          type: integer
      type: object
    models.Product:
      description: |-
        Product models any product from any e-commerce platform
        Important! the alias at the end is for API docs generation
        @Description A product from the e-commerce
        @name api.Product
      properties:
        id:
          description: Unique identifier for the resource in the source platform
          type: string
        images:
          description: Images associated to the product
          items:
            $ref: '#/components/schemas/models.ProductImage'
          type: array
        name:
          description: Product name
          type: string
        price:
          description: price per unit (following MoneyFormat)
          type: string
        sku:
          description: unique identifier of the product
          type: string
        variants:
          description: >-
            Optional: product variations

            if a line-item references a varition, the attributes of the
            variation

            have to be used instead of the ones of the product
          items:
            $ref: '#/components/schemas/models.ProductVariant'
          type: array
      type: object
    models.ProductImage:
      description: |-
        Image
        Alias is for API docs generation
        Important! the alias at the end is for API docs generation
        @Description An image from the e-commerce catalog
        @name api.Image
      properties:
        alt:
          description: Image alternative text
          type: string
        name:
          description: Image name
          type: string
        src:
          description: Image URL
          type: string
      type: object
    models.ProductVariant:
      properties:
        enabled:
          description: enabled or disabled
          type: boolean
        id:
          description: Unique identifier for the resource in the source platform
          type: string
        images:
          description: Images associated to the variant
          items:
            $ref: '#/components/schemas/models.ProductImage'
          type: array
        inventory_quantity:
          description: inventory quantity (only check if inventory_enabled is true)
          type: string
        is_inventory_enabled:
          description: should be checked before checking quantity
          type: boolean
        name:
          description: Name of the variant
          type: string
        price:
          description: unit price
          type: string
        sku:
          description: unique identifier of the product
          type: string
      type: object
    models.RefundActionConfig:
      properties:
        name:
          enum:
            - NO_ACTION
            - TO_EXCHANGE
            - TO_RETURN
          format: enum
          type: string
        rever_id:
          type: string
        timing:
          enum:
            - NO_TIMING
            - ON_START_RETURN_PROCESS
            - ON_ITEM_SENT
            - ON_ITEM_VERIFIED
          format: enum
          type: string
        when:
          description: |-
            When conditions to evaluate
            Every entry is evaluated as an AND condition
            protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
          items:
            type: string
          type: array
      type: object
    models.RefundPaymentMethodConfig:
      properties:
        name:
          enum:
            - NO_PAYMENT_METHOD
            - BANK_TRANSFER
            - ORIGINAL
            - PROMO_CODE
            - GIFT_CARD
            - MANUAL
          format: enum
          type: string
        rever_id:
          type: string
        timing:
          enum:
            - NO_TIMING
            - ON_START_RETURN_PROCESS
            - ON_ITEM_SENT
            - ON_ITEM_VERIFIED
          format: enum
          type: string
        when:
          description: |-
            When conditions to evaluate
            Every entry is evaluated as an AND condition
            protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
          items:
            type: string
          type: array
      type: object
    models.ReturnLineItem:
      description: |-
        ReturnLineItem
        Important! the alias at the end is for API docs generation
        @Description One of the line items in a return process
      properties:
        action:
          description: User action with this item
          enum:
            - NO_ACTION
            - TO_EXCHANGE
            - TO_RETURN
          format: enum
          type: string
        comment:
          description: Return comment
          type: string
        id:
          description: Id of the line item in the source platform
          type: string
        name:
          description: Name of the line item (not necessarily the name of the product)
          type: string
        pending_purchase:
          description: if this line item refers to an item that we need to buy (exchange)
          type: boolean
        product:
          allOf:
            - $ref: '#/components/schemas/models.Product'
          description: 'Deprecated: Product is nil outside of Workflow'
        product_id:
          description: to get product details, request the product (API)
          type: string
        product_image_url:
          description: URL of the main image of the product/line-item
          type: string
        product_reference:
          description: >-
            Reference of the product (usually more human readable than product
            ID)
          type: string
        product_return_reason:
          description: ProductReturnReason
          type: string
        quantity:
          description: number of items of the same product + variant
          format: int32
          type: integer
        refund_payment_method:
          description: User refund payment method
          enum:
            - NO_PAYMENT_METHOD
            - BANK_TRANSFER
            - ORIGINAL
            - PROMO_CODE
            - GIFT_CARD
            - MANUAL
          format: enum
          type: string
        return_reason:
          description: |-
            Reason why it's returned
            Deprecated
          enum:
            - NO_RETURN_REASON
            - WRONG_SIZE
            - WRONG_COLOR
            - NOT_AS_EXPECTED
            - DEFECTIVE
            - CHANGED_MY_MIND
            - WRONG_ITEM
            - WRONG_SIZE_TOO_SMALL
            - WRONG_SIZE_TOO_BIG
          format: enum
          type: string
        rever_id:
          description: Id of the line item in rever system
          type: string
        reviews:
          description: Reviews of individual items included in the line item
          items:
            $ref: '#/components/schemas/models.LineItemReview'
          type: array
        sku:
          description: |-
            stock-keeping unit (SKU) is a scannable bar code, most 
             often seen printed on product labels in a retail store
          type: string
        subtotal:
          description: |-
            sub total amount of the line following the MoneyFormat of the order
            before discounts and taxes
            subtotal = unit_price * quantity
          type: string
        subtype:
          description: Subtype of the item
          type: string
        total:
          description: >-
            total amount of the line following the MoneyFormat of the order

            including discounts and tax

            total = (subtotal - total_discounts) + total_taxes

            this is the amount to be refunded (multiplied by
            items_returned/quantity)
          type: string
        total_discounts:
          description: total amount of discounts of the line following the MoneyFormat
          type: string
        total_taxes:
          description: total amount of taxes of the line following the MoneyFormat
          type: string
        type:
          description: Return line item type
          type: string
        unit_price:
          description: |-
            unit price of a single  item (no discounts, no taxes)
            follows MoneyFormat associated
          type: string
        variant_ean:
          description: Variant EAN
          type: string
        variant_id:
          description: |-
            variant of the product (same ProductID, different Variant)
            we are allowing only one variant at the moment (one dimension)
          type: string
        variant_name:
          description: Name of the variant
          type: string
        variant_reference:
          description: >-
            Reference of the variant (usually more human readable than variant
            ID)
          type: string
      type: object
    models.ReturnProcess:
      description: |-
        A return process happening in the platform
        @Description A return process happening in the platform
        @Name api.ReturnProcess
      properties:
        ReviewFlow:
          description: |-
            Do not change field name, we have "ReviewFlow" in the JSON 
             right now instead of `review_flow``.
             Review flow can be manual (MANUAL) or automatic (AUTO)
             If an item has to be reviewed when reaching the warehouse and the flow is MANUAL, 
             the process will wait for manual input. If AUTO, it will be approved automatically
             protolint:disable:next FIELD_NAMES_LOWER_SNAKE_CASE
          type: string
        action_config:
          description: protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
          items:
            $ref: '#/components/schemas/models.RefundActionConfig'
          type: array
        authorization_status:
          type: string
        bank_account_country:
          description: bank_account_country
          type: string
        bban:
          description: BBAN Basic Bank Account number
          type: string
        billing_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: 'Deprecated: it is not stored in the db'
        canceled_at:
          description: When the process was canceled
          format: date-time
          type: string
        carrier_name:
          description: the Name of the carrier != provider
          type: string
        checkout_id:
          description: Checkout id
          type: string
        completed_at:
          description: When the process was completed
          format: date-time
          type: string
        currency:
          description: >-
            Return process' currency (in most cases, currency in which the order
            was paid)
          type: string
        currency_shop:
          description: Shop's default currency
          type: string
        customer:
          allOf:
            - $ref: '#/components/schemas/models.Customer'
          description: the customer that ordered the return
        customer_printed_order_id:
          description: for searching/information purposes
          type: string
        delivery_note_status:
          description: Delivery note status
          type: string
        drop_off_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: where to drop-off this return
        ecommerce_id:
          description: Internal Rever e-commerce_id
          type: string
        exchange_flow:
          enum:
            - NO_EXCHANGE_FLOW
            - OPEN
            - ONE_ON_ONE
            - OPEN_WITH_GIFT_CARD
            - FULL
          format: enum
          type: string
        exchange_order_number:
          description: >-
            Order number (customer printed) of the order created for the
            exchange

            TODO: this is going to be deprecated by a Transaction entry

            so that we can treat all of the external operations equally
          type: string
        exchange_rate:
          description: >-
            Relation between shop and customer amounts saved in db

            Exchange rate = Shop currency amount in DB / Customer currency
            amount in DB

            Exchange rate = (Shop currency real amount * Shop currency
            amount_multiplied_by)

            divided by Customer currency real amount * Customer currency
            amount_multiplied_by)
          format: double
          type: number
        exchange_shipping_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: address where to send the exchanged items
        fraud_model_group:
          description: Fraud model group
          type: string
        fraud_model_outcome:
          description: Fraud model outcome
          type: string
        fraud_model_score:
          description: Fraud model score
          format: float
          type: number
        group:
          description: Group
          type: string
        iban:
          description: IBAN
          type: string
        internal_comments:
          description: >-
            Comments associated to the return process (internal -- only REVER
            should see them)
          items:
            $ref: '#/components/schemas/models.Comment'
          type: array
        is_lite:
          type: boolean
        is_testing:
          description: if the return process is a test one or not
          type: boolean
        keep_your_item_type:
          description: Keep your item type
          type: string
        last_known_shipping_status:
          description: last communicated status of the shipping
          enum:
            - NO_SHIPPING_STATUS
            - CREATED
            - COLLECTED
            - IN_WAREHOUSE
            - ERROR
            - CANCELED
          format: enum
          type: string
        line_items:
          description: |-
            Return LineItems --> the items being returned + lines 
             related to the balance (example: shipping cost)
          items:
            $ref: '#/components/schemas/models.ReturnLineItem'
          type: array
        logistic_order_id:
          type: string
        order_id:
          description: Order ID in the source platform
          type: string
        order_purchased_at:
          description: When the order was purchased
          format: date-time
          type: string
        payment_method_config:
          description: |-
            Refund method and action configurations
            protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
          items:
            $ref: '#/components/schemas/models.RefundPaymentMethodConfig'
          type: array
        pickup_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: where to pick-up this return
        pickup_ranges:
          description: Pickup ranges for deliver the returns
          items:
            enum:
              - NO_RANGE
              - RANGE_8_TO_12
              - RANGE_12_TO_16
              - RANGE_16_TO_20
            format: enum
            type: string
          type: array
        platform:
          description: Platform from where this order was retrieved
          enum:
            - MOCK
            - WOOCOMMERCE
            - SHOPIFY
            - CUSTOM_GENERIC
            - PRESTASHOP
            - MAGENTO_V1
            - MAGENTO_V2
            - SALESFORCE
          format: enum
          type: string
        platform_process_id:
          description: |-
            Platform process id
            This is the id of the return process in the source platform
          type: string
        process_id:
          description: |-
            Identifier of the workflow - generated externally
            Unique ID for the entity
          type: string
        refund_timing:
          description: When the refund/exchange transactions will be executed
          enum:
            - NO_TIMING
            - ON_START_RETURN_PROCESS
            - ON_ITEM_SENT
            - ON_ITEM_VERIFIED
          format: enum
          type: string
        return_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: where to return this return process
        return_method:
          description: Return method
          enum:
            - NO_RETURN_METHOD
            - HOME_PICK_UP
            - DROP_OFF_POINT
            - DELIVERY_PICKUP
            - IN_STORE
          format: enum
          type: string
        start_return_on_platform_time:
          description: The timing for starting a return on the ecommerce platoform
          enum:
            - START_RETURN_ON_PLATFORM_TIME_UNSPECIFIED
            - START_RETURN_ON_PLATFORM_TIME_ON_START
            - START_RETURN_ON_PLATFORM_TIME_ON_ITEM_VERIFICATION
            - START_RETURN_ON_PLATFORM_TIME_NEVER
          format: enum
          type: string
        started_at:
          description: When the process was started
          format: date-time
          type: string
        status:
          description: current status of the process
          enum:
            - RUNNING
            - FAILED
            - COMPLETED
            - ON_HOLD
            - RETURN_STATUS_CANCELED
          format: enum
          type: string
        swift:
          description: SWIFT For international accounts numbers
          type: string
        transactions:
          description: |-
            Transactions associated to the return process
            executed in third party platforms
          items:
            $ref: '#/components/schemas/models.Transaction'
          type: array
        upload_documents_enabled:
          description: Upload documents enabled
          type: boolean
        user_preferred_lang:
          description: |-
            the language the user selected for the return process
            Should have values like "es" or "es-ES", "en", "en-GB"....
          type: string
        user_selected_carrier:
          description: >-
            Which carrier has the user selected. It can be NONE as default or

            a specific one like Correos, UPS, DHL, etc.

            It's not necessarily the one used to finally create the shipping
            label

            This values is the one that the user selected in the UI
          type: string
        user_selected_provider:
          description: >-
            Which logistics provider has the user selected. It can be NONE as
            default, OPS

            to use REVER's ops team or a specific provider (ie SendCloud).
          type: string
        warehouse_id:
          type: string
      type: object
    models.Shipment:
      properties:
        created_at:
          format: date-time
          type: string
        delivery_date:
          format: date-time
          type: string
        from:
          $ref: '#/components/schemas/models.Address'
        id:
          type: string
        is_without_label:
          type: boolean
        logistic_order_id:
          type: string
        packages:
          items:
            $ref: '#/components/schemas/models.Package'
          type: array
        process_id:
          type: string
        shipment_type:
          enum:
            - NO_RETURN_METHOD
            - HOME_PICK_UP
            - DROP_OFF_POINT
            - DELIVERY_PICKUP
            - IN_STORE
          format: enum
          type: string
        status:
          type: string
        to:
          $ref: '#/components/schemas/models.Address'
        tracking_id:
          type: string
        tracking_url:
          type: string
        updated_at:
          format: date-time
          type: string
      type: object
    models.Transaction:
      description: |-
        Transaction 
         @Description model of a transaction executed in a third party
         provider associated to a return process
         @name api.Transaction
      properties:
        amount:
          description: Amount following MoneyFormat
          type: string
        created_at:
          description: >-
            Should we include the user? it's the one coming from the return
            process

            When the transaction started its execution
          format: date-time
          type: string
        currency:
          description: Currency
          type: string
        metadata:
          additionalProperties:
            type: string
          description: Metadata associated to the transaction
          type: object
        note:
          description: Description/notes associated
          type: string
        platform_id:
          description: |-
            Identifier of the transaction in the provider
             Examples: the order_id when an excahnge is created, 
             or the tracking_id when the shipping is created
          type: string
        platform_url:
          description: |-
            URL associated to this transaction in the external system
            Examples: tracking_url of a shipment
          type: string
        process_id:
          description: >-
            Rever Return Process associated to this transaction (can only be
            one)
          type: string
        provider:
          description: >-
            Provider of the transaction (where we execute the transaction)

            Example: if it's an exchange, it's the e-commerce platform like
            SHOPIFY. Same for

            refunding on original payment method

            Other values could be: BIZUM, REVOLUT, STRIPE....
          enum:
            - TXPROVIDER_MOCK
            - TXPROVIDER_WOOCOMMERCE
            - TXPROVIDER_SHOPIFY
            - TXPROVIDER_CUSTOM_GENERIC
            - TXPROVIDER_PRESTASHOP
            - TXPROVIDER_MAGENTO_V1
            - TXPROVIDER_MAGENTO_V2
            - TXPROVIDER_SALESFORCE
            - TXPROVIDER_REVOLUT
            - TXPROVIDER_STRIPE
            - TXPROVIDER_SENDCLOUD
            - TXPROVIDER_CORREOS
            - TXPROVIDER_CORREOS_EXPRESS
            - TXPROVIDER_SHIPPY_PRO
            - TXPROVIDER_UPS
            - TXPROVIDER_GLS
            - TXPROVIDER_DHL
            - TXPROVIDER_DHL_EXPRESS
            - TXPROVIDER_DHL_PARCEL
            - TXPROVIDER_RHENUS
            - TXPROVIDER_FEDEX
            - TXPROVIDER_ZELERIS
            - TXPROVIDER_SENDCLOUD_ECOMMERCE
            - TXPROVIDER_ENOVO
            - TXPROVIDER_ZELO
            - TXPROVIDER_COLISSIMO
            - TXPROVIDER_CTT
            - TXPROVIDER_NONE
          format: enum
          type: string
        refund_payment_method:
          description: Payment method associated (only when action == TO_REFUND)
          enum:
            - NO_PAYMENT_METHOD
            - BANK_TRANSFER
            - ORIGINAL
            - PROMO_CODE
            - GIFT_CARD
            - MANUAL
          format: enum
          type: string
        rever_id:
          description: |-
            Unique ID in the rever platform 
             Should start with tx_
          type: string
        status:
          description: Status of the transaction. Only consider COMPLETED as succesful
          enum:
            - NO_TRANSACTION_STATUS
            - TX_COMPLETED
            - TX_DENIED
            - TX_IN_PROGRESS
            - TX_ERROR
            - TX_CANCELED
          format: enum
          type: string
        type:
          description: Type of transaction (exchange operation, refund operation....)
          enum:
            - TXTYPE_UNKNOWN
            - TXTYPE_REFUND
            - TXTYPE_EXCHANGE
            - TXTYPE_LOGISTICS
            - TXTYPE_RETURN
            - TXTYPE_PICKUP
            - TXTYPE_COMMIT
            - TXTYPE_LOST
            - TXTYPE_PAYMENT
            - TXTYPE_COMMIT_PAYMENT
            - TXTYPE_COMMIT_EXCHANGE
          format: enum
          type: string
        updated_at:
          description: |-
            Time of the last update (status might have changed
            for example, from IN_PROGRESS to COMPLETED)
          format: date-time
          type: string
        user:
          description: Who executed it
          type: string
      type: object
    opspb.CancelInternalRequest:
      properties:
        process_id:
          type: string
        reason:
          type: string
        user:
          type: string
      type: object
    opspb.CancelRequest:
      properties:
        process_id:
          type: string
        reason:
          type: string
      type: object
    opspb.CancelResponse:
      type: object
    opspb.EcommerceAudit:
      properties:
        data:
          type: string
        entity:
          type: string
        id:
          type: string
        message:
          type: string
        name:
          type: string
        time:
          type: string
        user:
          type: string
      type: object
    opspb.EcommerceAuditRequest:
      properties:
        ecommerce_id:
          type: string
      type: object
    opspb.EcommerceAuditResponse:
      properties:
        audits:
          items:
            $ref: '#/components/schemas/opspb.EcommerceAudit'
          type: array
      type: object
    opspb.ItemReviewGeneric:
      properties:
        line_item_id:
          description: line item id
          type: string
        location_id:
          description: location id
          type: string
        reject_reason:
          description: reject reason
          type: string
        should_restock:
          description: should restock
          type: boolean
        sku:
          description: sku
          type: string
        status:
          description: status
          type: string
        timestamp:
          description: timestamp
          format: date-time
          type: string
        user:
          description: user
          type: string
      type: object
    opspb.JiraRequest:
      properties:
        message:
          type: string
        process_id:
          type: string
      type: object
    opspb.JiraResponse:
      type: object
    opspb.LogisticsRequest:
      properties:
        process_id:
          type: string
      type: object
    opspb.LogisticsResponse:
      type: object
    opspb.OpsMoney:
      properties:
        amount:
          type: string
        currency_code:
          type: string
      type: object
    opspb.RefundOverride:
      properties:
        amount:
          $ref: '#/components/schemas/opspb.OpsMoney'
        reason:
          type: string
        requested:
          type: boolean
      type: object
    opspb.RestockItem:
      properties:
        line_item_id:
          type: string
        location_id:
          type: string
        product_id:
          type: string
        quantity:
          format: int32
          type: integer
        variant_id:
          type: string
      type: object
    opspb.RestockItemsRequest:
      properties:
        ecommerce_id:
          type: string
        process_id:
          type: string
        restock_items:
          items:
            $ref: '#/components/schemas/opspb.RestockItem'
          type: array
        user:
          type: string
      type: object
    opspb.RestockItemsResponse:
      type: object
    opspb.Review:
      properties:
        line_item_id:
          description: line item id
          type: string
        location_id:
          description: location id
          type: string
        reject_reason:
          description: reject reason
          type: string
        rever_id:
          description: review id
          type: string
        should_restock:
          description: should restock
          type: boolean
        show_reject_reason:
          description: should show reject reason
          type: boolean
        status:
          description: status
          type: string
        timestamp:
          description: timestamp
          format: date-time
          type: string
        user:
          description: user
          type: string
      type: object
    opspb.ReviewItemsGenericRequest:
      properties:
        platform_process_id:
          description: process id, deprecated
          type: string
        process_id:
          description: process id
          type: string
        reviews:
          description: reviews to be processed
          items:
            $ref: '#/components/schemas/opspb.ItemReviewGeneric'
          type: array
      type: object
    opspb.ReviewItemsRequest:
      properties:
        process_id:
          description: process id
          type: string
        refund_override:
          $ref: '#/components/schemas/opspb.RefundOverride'
        reviews:
          description: reviews to be processed
          items:
            $ref: '#/components/schemas/opspb.Review'
          type: array
      type: object
    opspb.ReviewItemsResponse:
      type: object
    opspb.SignalFailRequest:
      properties:
        process_ids:
          items:
            type: string
          type: array
      type: object
    opspb.SignalFailResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/opspb.SignalWorkflowError'
          type: array
      type: object
    opspb.SignalWorkflowError:
      properties:
        error_message:
          type: string
        process_id:
          type: string
      type: object
    opspb.SoftDeleteRequest:
      properties:
        process_ids:
          items:
            type: string
          type: array
      type: object
    opspb.SoftDeleteResponse:
      type: object
    opspb.SubmitAuthorizationRequest:
      properties:
        authorized:
          type: boolean
        process_id:
          type: string
        refund_override:
          $ref: '#/components/schemas/opspb.RefundOverride'
        unauthorized_reason:
          type: string
        user:
          type: string
      type: object
    opspb.SubmitAuthorizationResponse:
      type: object
    opspb.UpdateLKSSInternalRequest:
      properties:
        lkss:
          enum:
            - NO_SHIPPING_STATUS
            - CREATED
            - COLLECTED
            - IN_WAREHOUSE
            - ERROR
            - CANCELED
          format: enum
          type: string
        process_id:
          type: string
        user:
          type: string
      type: object
    opspb.UpdateLKSSRequest:
      properties:
        lkss:
          enum:
            - NO_SHIPPING_STATUS
            - CREATED
            - COLLECTED
            - IN_WAREHOUSE
            - ERROR
            - CANCELED
          format: enum
          type: string
        process_id:
          type: string
      type: object
    opspb.UpdateLKSSResponse:
      type: object
    pb.ActionConfig:
      description: ActionConfig
      properties:
        name:
          description: Name
          type: string
        timing:
          description: Timing
          type: string
        whens:
          description: Whens
          items:
            type: string
          type: array
      type: object
    pb.AddCommentInternalRequest:
      properties:
        comment_type:
          type: string
        extra:
          type: string
        manual:
          type: boolean
        process_id:
          type: string
        text:
          type: string
        user:
          type: string
      type: object
    pb.AddCommentInternalResponse:
      type: object
    pb.AddCommentRequest:
      description: Payload for creating a comment in the system.
      properties:
        comment_type:
          description: Comment type
          type: string
        extra:
          description: Optional (extra) data associated to the comment
          type: string
        manual:
          description: |-
            If the comment is created directly by a human or it's automated
            Affects in how the comments are displayed
          type: boolean
        process_id:
          description: Process ID to associate the comment. Required.
          type: string
        text:
          description: Comment's text. Required.
          type: string
      type: object
    pb.AddCommentResponse:
      type: object
    pb.AddNewPASettingRequest:
      description: >-
        AddNewPASettingRequest contains the request to add a new setting to a
        section
      properties:
        new_settings:
          description: The new settings to be added
          items:
            $ref: '#/components/schemas/pb.PANewSetting'
          type: array
        section_name:
          description: The section where the new settigns will be added to
          type: string
      type: object
    pb.AddNewPASettingResponse:
      description: >-
        AddNewPASettingResponse contains the response to add a new setting to a
        section
      type: object
    pb.AddPASettingsSectionRequest:
      description: >-
        AddPASettingsSectionRequest contains the request to add a new section to
        the PA settings
      properties:
        section_defaults:
          description: The section defaults
          items:
            $ref: '#/components/schemas/pb.PANewSetting'
          type: array
        section_name:
          description: The section name
          type: string
      type: object
    pb.AddPASettingsSectionResponse:
      description: >-
        AddPASettingsSectionResponse contains the response to add a new section
        to the PA settings
      type: object
    pb.AddReviewRequest:
      properties:
        process_id:
          description: ID of the process in where the review is being added. Required.
          type: string
        refund_override:
          allOf:
            - $ref: '#/components/schemas/pb.RefundOverride'
          description: Refund override
        reviews:
          description: Review data. Required.
          items:
            $ref: '#/components/schemas/pb.ReviewLineItem'
          type: array
      type: object
    pb.AddReviewResponse:
      type: object
    pb.AddTransactionsInternalRequest:
      description: |-
        Payload for adding transactions to a process
        The transactions are added to the process and the process is updated
      properties:
        process_id:
          description: Process ID to associate the transactions. Required.
          type: string
        transaction_inputs:
          description: List of transaction inputs.
          items:
            $ref: '#/components/schemas/pb.TransactionInput'
          type: array
        user:
          description: User that created the transactions.
          type: string
      type: object
    pb.AddTransactionsRequest:
      description: |-
        Payload for adding transactions to a process
        The transactions are added to the process and the process is updated
      properties:
        process_id:
          description: Process ID to associate the transactions. Required.
          type: string
        transaction_inputs:
          description: List of transaction inputs.
          items:
            $ref: '#/components/schemas/pb.TransactionInput'
          type: array
      type: object
    pb.AddTransactionsResponse:
      description: Response for adding transactions to a process
      type: object
    pb.Address:
      description: Generic address used in many scenarios
      properties:
        address_line_1:
          description: Address line 1 (max 24 chars)
          type: string
        address_line_2:
          description: Address line 2 (max 24 chars)
          type: string
        city:
          description: City, Required.
          type: string
        company:
          description: Company name
          type: string
        country:
          description: |-
            Country name. No specific language is required
            Required.
          type: string
        country_code:
          description: |-
            Country code ISO 3166-1 alpha-2
            Required
          type: string
        email:
          description: Email (Optional)
          type: string
        first_name:
          description: Name of the person, Required
          type: string
        last_name:
          description: Last name of the person
          type: string
        phone:
          description: Phone (Optional)
          type: string
        postcode:
          description: Postal code. Required.
          type: string
        state_province:
          description: State or province
          type: string
        state_province_code:
          description: |-
            State or province code (optional)
            TODO: what is the expected format?
          type: string
      type: object
    pb.Analytics:
      description: Analytics settings
      properties:
        order_sync_disabled:
          description: Flag to enable analytics order sync
          type: boolean
      type: object
    pb.ApproveAllRequest:
      properties:
        process_id:
          description: ID of the process withe the return items to be approved. Required.
          type: string
        user:
          description: User that performed the approval. Required.
          type: string
      type: object
    pb.ApproveAllResponse:
      type: object
    pb.AvailableReturnReasons:
      properties:
        available_reasons:
          description: list of available reasons
          items:
            $ref: '#/components/schemas/pb.EcommerceReturnReason'
          type: array
        parent_reason:
          allOf:
            - $ref: '#/components/schemas/pb.EcommerceReturnReason'
          description: mother reason
      type: object
    pb.AxerveGatewaySettings:
      description: AxerveGatewaySettings is the settings for the Axerve gateway
      properties:
        api_key:
          description: Api key
          type: string
        environment:
          description: Environment
          enum:
            - ENVIRONMENT_UNSPECIFIED
            - ENVIRONMENT_PRODUCTION
            - ENVIRONMENT_DEVELOPMENT
            - ENVIRONMENT_SANDBOX
          format: enum
          type: string
        is_active:
          description: Is active
          type: boolean
        store_id:
          description: Store ID
          type: string
      type: object
    pb.B2CSettings:
      description: B2C Commerce specific settings
      properties:
        base_static_files_url:
          description: Base URL for static files
          type: string
        business_manager_url:
          description: Business manager URL for the B2C Commerce instance
          type: string
        catalog_id:
          description: ID of the product catalog
          type: string
        default_currency:
          description: Default currency for the store
          type: string
        organization_id:
          description: ID of the Salesforce organization
          type: string
        public_domain:
          description: Public domain for the B2C Commerce instance
          type: string
        short_code:
          description: Short code for the B2C Commerce instance
          type: string
        site_id:
          description: ID of the B2C Commerce site
          type: string
      type: object
    pb.BankTransferCompensation:
      properties:
        refunds:
          items:
            $ref: '#/components/schemas/pb.BankTransferRefund'
          type: array
        summary:
          $ref: '#/components/schemas/pb.CompensationSummary'
      type: object
    pb.BankTransferRefund:
      properties:
        amount:
          $ref: '#/components/schemas/pb.MoneyBag'
        created_at:
          format: date-time
          type: string
      type: object
    pb.BasicECommerceInfoResponse:
      description: List of E-commerce basic E-commerce info
      properties:
        ecommerce_infos:
          description: List of E-commerce info
          items:
            $ref: '#/components/schemas/pb.BasicEcommerceInfo'
          type: array
      type: object
    pb.BasicEcommerceInfo:
      description: Basic E-commerce info
      properties:
        ecommerce_id:
          description: The id of the e-commerce.
          type: string
        group:
          description: The group of the e-commerce.
          type: string
      type: object
    pb.BasicProcessData:
      properties:
        customer_printed_order_id:
          description: Customer printed order ID
          type: string
        ecommerce_group:
          description: Ecommerce Group
          type: string
        ecommerce_id:
          description: Ecommerce ID
          type: string
        is_lite:
          description: IsLite
          type: boolean
        is_testing:
          description: Flag for a test process
          type: boolean
        order_id:
          description: Order ID
          type: string
        order_purchased_at:
          description: Order Purchase Date
          format: date-time
          type: string
        platform:
          description: Platform
          enum:
            - MOCK
            - WOOCOMMERCE
            - SHOPIFY
            - CUSTOM_GENERIC
            - PRESTASHOP
            - MAGENTO_V1
            - MAGENTO_V2
            - SALESFORCE
          format: enum
          type: string
        platform_process_id:
          description: Platform process ID
          type: string
        process_id:
          description: Process ID
          type: string
        started_at:
          description: Started at
          format: date-time
          type: string
      type: object
    pb.BrandInformation:
      description: BrandInformation is the general information about the brand
      properties:
        ecommerce_name:
          description: name of the brand
          type: string
        group:
          description: group
          type: string
        platform:
          description: platform
          enum:
            - MOCK
            - WOOCOMMERCE
            - SHOPIFY
            - CUSTOM_GENERIC
            - PRESTASHOP
            - MAGENTO_V1
            - MAGENTO_V2
            - SALESFORCE
          format: enum
          type: string
        restocking_available:
          description: restocking available
          type: boolean
      type: object
    pb.Branding:
      description: Branding model
      properties:
        background_image_url:
          description: BackgroundImageUrl
          type: string
        background_text_color:
          description: BackgroundTextColor
          type: string
        border_radius:
          description: BorderRadius
          type: string
        ecommerce_id:
          description: EcommerceID
          type: string
        favicon_url:
          description: FaviconUrl
          type: string
        input_variant:
          description: InputVariant
          type: string
        layout_design_values:
          description: LayoutDesignValues
          enum:
            - DEFAULT
            - VERTICAL
            - SIMPLIFIED
          format: enum
          type: string
        logo_height_desktop:
          description: LogoHeightDesktop
          type: string
        logo_height_mobile:
          description: LogoHeightMobile
          type: string
        logo_url:
          description: LogoUrl
          type: string
        mail_logo_url:
          description: MailLogoUrl
          type: string
        mail_main_color:
          description: MailMainColor
          type: string
        primary_theme_color_contrast_text:
          description: PrimaryThemeColorContrastText
          type: string
        primary_theme_color_dark:
          description: PrimaryThemeColorDark
          type: string
        primary_theme_color_light:
          description: PrimaryThemeColorLight
          type: string
        primary_theme_color_main:
          description: PrimaryThemeColorMain
          type: string
        secondary_theme_color_contrast_text:
          description: SecondaryThemeColorContrastText
          type: string
        secondary_theme_color_dark:
          description: SecondaryThemeColorDark
          type: string
        secondary_theme_color_light:
          description: SecondaryThemeColorLight
          type: string
        secondary_theme_color_main:
          description: SecondaryThemeColorMain
          type: string
        slogan:
          description: Slogan
          type: string
        title:
          description: Title
          type: string
      type: object
    pb.BusinessRule:
      description: BusinessRule
      properties:
        name:
          description: Name of Business rule
          type: string
        params:
          additionalProperties:
            type: string
          description: Params needed for the business rule
          type: object
        when:
          description: |-
            When conditions to evaluate
            Every entry is evaluated as an AND condition
            protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
          items:
            type: string
          type: array
      type: object
    pb.BxGyDiscount:
      description: BxGyDiscount keeps the data for the Buy X Get Y discount
      properties:
        buy_line_item_ids:
          description: list of line item ids that were paid for completely
          items:
            type: string
          type: array
        get_line_items:
          description: list of line item ids that were discounted
          items:
            $ref: '#/components/schemas/pb.BxGyGetLineItem'
          type: array
      type: object
    pb.BxGyGetLineItem:
      description: Line Item
      properties:
        amount:
          allOf:
            - $ref: '#/components/schemas/pb.EcommerceMoney'
          description: amount discounted
        line_item_id:
          description: line item id that was discounted
          type: string
      type: object
    pb.CancelGiftCardResponse:
      type: object
    pb.CancelPromocodeResponse:
      type: object
    pb.ChangeToBankTransferResponse:
      type: object
    pb.Collection:
      properties:
        id:
          description: Unique identifier for the resource in the source platform
          type: string
      type: object
    pb.Compensation:
      properties:
        bank_transfer:
          $ref: '#/components/schemas/pb.BankTransferCompensation'
        editable_refund_amount:
          $ref: '#/components/schemas/pb.Compensation_EditableRefundAmount'
        exchange:
          $ref: '#/components/schemas/pb.ExchangeCompensation'
        gift_card:
          $ref: '#/components/schemas/pb.GiftCardCompensation'
        original_payment_method:
          $ref: '#/components/schemas/pb.OriginalPaymentMethodCompensation'
        promocode:
          $ref: '#/components/schemas/pb.PromocodeCompensation'
      type: object
    pb.Compensation_EditableRefundAmount:
      properties:
        is_refund_amount_editable:
          type: boolean
        maximum_refundable_amount:
          $ref: '#/components/schemas/pb.MoneyBag'
      type: object
    pb.CompensationSummary:
      properties:
        adjusted_commitment:
          $ref: '#/components/schemas/pb.MoneyBag'
        adjustment_reason:
          type: string
        adjustments:
          $ref: '#/components/schemas/pb.MoneyBag'
        executed:
          $ref: '#/components/schemas/pb.MoneyBag'
        initial_commitment:
          $ref: '#/components/schemas/pb.MoneyBag'
        timing:
          enum:
            - TIMING_UNSPECIFIED
            - TIMING_NO_TIMING
            - TIMING_ON_START
            - TIMING_ON_SENT
            - TIMING_ON_VERIFIED
          format: enum
          type: string
      type: object
    pb.Condition:
      description: Condition to evaluate
      properties:
        comparison:
          description: Comparison to evaluate
          type: string
        function:
          description: Function to evaluate
          type: string
        values:
          description: Value to compare
          items:
            type: string
          type: array
        variable:
          description: Variable to evaluate
          type: string
      type: object
    pb.Config:
      description: Configurations
      properties:
        functions:
          description: Functions
          items:
            $ref: '#/components/schemas/pb.Function'
          type: array
        name:
          description: Name of the configuration
          type: string
        params:
          description: Params
          items:
            $ref: '#/components/schemas/pb.Param'
          type: array
      type: object
    pb.CopyDetail:
      description: Copy Details with default values
      properties:
        lang_tag:
          description: The language of the copy.
          type: string
        text:
          description: The text of the copy.
          type: string
      type: object
    pb.CopyDetails:
      description: CopyDetails
      properties:
        editable:
          description: is the text editable by the e-commerce
          type: boolean
        tag:
          description: tag of the copy
          type: string
        text:
          description: text per language
          type: string
      type: object
    pb.CopyReturnAmountRequest:
      description: GetReturnAmountRequest is the request to get the return amount
      properties:
        from_ecommerce_id:
          description: The id of the e-commerce.
          type: string
        to_ecommerce_id:
          description: The id of the e-commerce.
          type: string
      type: object
    pb.CopyReturnAmountResponse:
      description: CopyReturnAmountResponse is the response to get the return amount
      properties:
        rules:
          description: Return amount business rules
          items:
            $ref: '#/components/schemas/pb.ReturnAmountRule'
          type: array
      type: object
    pb.CopyReturnReasonsRequest:
      description: CopyReturnReasons is the request to copy the return reasons
      properties:
        from_ecommerce_id:
          description: The id of the e-commerce.
          type: string
        to_ecommerce_id:
          description: The id of the e-commerce.
          type: string
      type: object
    pb.CopyReturnReasonsResponse:
      description: CopyReturnReasonsResponse is the response to copy the return reasons
      type: object
    pb.CopyTextDetail:
      description: |-
        CopyTextDetail
        CopyTgit sextDetail
      properties:
        field_tag:
          description: Name of the field Tag
          type: string
        is_ecommerce_editable:
          description: is the text editable by the e-commerce
          type: boolean
        lang_tag:
          description: language of the text
          type: string
        text:
          description: language of the text
          type: string
      type: object
    pb.CreateNewTextCopyResponse:
      description: Empty response for creating new text copy
      type: object
    pb.CreatePromocodeRequest:
      properties:
        amount_return_process:
          description: |-
            Amount of the promo code to be created, without decimals
            in the `currency_return_process` format
            TODO: should be renamed to `amount_customer` ?
          type: string
        amount_shop:
          description: |-
            Amount of the promo code to be created, without decimals
            in the `currency_shop` format
          type: string
        currency_return_process:
          description: |-
            TODO: should be renamed to `currency_customer` ?
            Currency of the `amount_return_process` field (customer currency)
          type: string
        currency_shop:
          description: Currency of the `amount_shop` field (shop currency)
          type: string
        customer_printed_order_id:
          description: Customer printed order id (not necessarily the platform `order_id`)
          type: string
        ecommerce_id:
          description: Ecommerce id
          type: string
      type: object
    pb.CreatePromocodeResponse:
      properties:
        promocode:
          description: Code of the created promocode
          type: string
      type: object
    pb.CreateUserRequest:
      description: CreateUserRequest
      properties:
        ecommerce_group:
          description: Group
          type: string
        user:
          allOf:
            - $ref: '#/components/schemas/pb.DashboardUser'
          description: User
      type: object
    pb.CreateUserResponse:
      description: CreateUserResponse
      properties:
        user:
          allOf:
            - $ref: '#/components/schemas/pb.DashboardUser'
          description: User
      type: object
    pb.Customer_Address:
      properties:
        address_line_1:
          type: string
        address_line_2:
          type: string
        city:
          type: string
        country_code:
          type: string
        phone:
          type: string
        postal_code:
          type: string
      type: object
    pb.DashboardUser:
      description: DashboardUser is the user that can access the dashboard
      properties:
        assigned_warehouses:
          description: assigned warehouses
          items:
            type: string
          type: array
        email:
          description: email
          type: string
        role:
          description: role
          enum:
            - ROLE_UNSPECIFIED
            - ROLE_WRITE_ALL
            - ROLE_READ_ONLY
            - ROLE_REVIEWER
          format: enum
          type: string
      type: object
    pb.DashboardUsers:
      description: DashboardUsers is the list of users that can access the dashboard
      properties:
        users:
          description: list of user emails
          items:
            $ref: '#/components/schemas/pb.DashboardUser'
          type: array
      type: object
    pb.DiscountCode:
      description: Discount code used to purchase an item
      properties:
        amount:
          description: Amount discounted from the line item
          type: string
        applies_to_all_products:
          description: This discount code can be applied to any product
          type: boolean
        code:
          description: Code used to get the discount at purchase time
          type: string
        collection_ids:
          description: Collections that are discounted by this code
          items:
            type: string
          type: array
        id:
          description: Unique id of the discount code
          type: string
        product_ids:
          description: Products that are discounted by this code
          items:
            type: string
          type: array
        summary:
          description: Description of the discount code
          type: string
        type:
          description: Type can be fixed or percentage
          type: string
      type: object
    pb.ECommerceCopies:
      description: List of copies for an ecommerce
      properties:
        copies:
          description: List of copies for an ecommerce
          items:
            $ref: '#/components/schemas/pb.CopyTextDetail'
          type: array
      type: object
    pb.ECommerceCopiesResponse:
      description: Map of copies for a given e-commerce
      properties:
        language_copies:
          description: List of copies for a given e-commerce
          items:
            $ref: '#/components/schemas/pb.LanguageCopies'
          type: array
      type: object
    pb.ECommerceIdResponse:
      description: List of E-commerce ids
      properties:
        ecommerce_ids:
          description: List of E-commerce ids
          items:
            type: string
          type: array
      type: object
    pb.ECommerceIdentification:
      description: |-
        How to identify an e-commerce
         just use one of the fields that identifies the 
         e-commerce (by slug, id or group)
      properties:
        ecommerce_id:
          description: The id of the e-commerce. Optional.
          type: string
        group:
          description: >-
            The group of the e-commerce. Several e-commerces can have the same
            group. Optional.
          type: string
        slug:
          description: The path of an URL identifying the e-commerce. Optional.
          type: string
      type: object
    pb.ECommerceIdsFromGroupResponse:
      description: List of E-commerce ids from a group
      properties:
        ecommerce_ids:
          description: List of E-commerce Ids
          items:
            type: string
          type: array
      type: object
    pb.ECommerceSettings:
      description: |-
        Basic settings for an e-commerce
        @Description  Basic settings for an e-commerce
        @Name api.ECommerceSettings
      properties:
        WebsiteSettings:
          allOf:
            - $ref: '#/components/schemas/pb.WebsiteSettings'
          description: |-
            WebsiteSettings contains misc information about the e-commerce
             Used, for example, for redirecting the user to the 
             e-commerce website after the
             return is successfully created.
             protolint:disable:next FIELD_NAMES_LOWER_SNAKE_CASE
        analytics:
          allOf:
            - $ref: '#/components/schemas/pb.Analytics'
          description: Analytics settings
        delivery_note:
          description: Delivery note configuration
          type: string
        ecommerce_id:
          description: Identifier of the e-commerce in the Rever system
          type: string
        erp_settings:
          allOf:
            - $ref: '#/components/schemas/pb.ERPSettings'
          description: ERP settings
        exchange_order_settings:
          allOf:
            - $ref: '#/components/schemas/pb.ExchangeOrderSettings'
          description: Settings for the exchange order created in the ecommerce platform
        exchange_threshold:
          description: Exchange Threshold
          format: int32
          type: integer
        external_return_policy_url:
          description: External return policy URL
          type: string
        fraud_detection_settings:
          allOf:
            - $ref: '#/components/schemas/pb.FraudDetectionSettings'
          description: Fraud detection settings
        full_exchange_settings:
          allOf:
            - $ref: '#/components/schemas/pb.FullExchangeSettings'
          description: Full exchange settings
        group:
          description: Group the e-commerce belongs to
          type: string
        is_enabled:
          description: If the e-commerce is enabled
          type: boolean
        is_testing_account:
          description: If this is not a production (paying) account
          type: boolean
        magento_v1_settings:
          allOf:
            - $ref: '#/components/schemas/pb.MagentoV1Settings'
          description: Optional -- only if Magento
        magento_v2_settings:
          allOf:
            - $ref: '#/components/schemas/pb.MagentoV2Settings'
          description: Optional -- only if Magento
        mail_theme:
          allOf:
            - $ref: '#/components/schemas/pb.MailTheme'
          description: Branding options for emails
        name:
          description: Name of the E-commerce (user-friendly)
          type: string
        non_returnable_items:
          allOf:
            - $ref: '#/components/schemas/pb.NonReturnableItems'
          description: >-
            NonReturnableItems contains the list of products, categories,
            brands...

            that could be used to identify when a product has to be classified

            as non-returnable.
        payments_enabled:
          description: Flag to enable payments
          type: boolean
        platform:
          description: Platform the e-commerce is based on
          enum:
            - MOCK
            - WOOCOMMERCE
            - SHOPIFY
            - CUSTOM_GENERIC
            - PRESTASHOP
            - MAGENTO_V1
            - MAGENTO_V2
            - SALESFORCE
          format: enum
          type: string
        prestashop_settings:
          allOf:
            - $ref: '#/components/schemas/pb.PrestashopSettings'
          description: Optional -- only if Prestashop
        refund:
          allOf:
            - $ref: '#/components/schemas/pb.Refund'
          description: Refund
        reminder_flow:
          description: Reminder flow type
          type: string
        restocking_available:
          description: Restocking available
          type: boolean
        return_amount:
          allOf:
            - $ref: '#/components/schemas/pb.ReturnAmount'
          description: ReturnAmount with business rules
        return_logistics:
          description: |-
            Return logistics configures different ways for the users to 
             physically return the items to the e-commerce
          items:
            $ref: '#/components/schemas/pb.ReturnLogistics'
          type: array
        return_period_days:
          description: Return days limit
          format: int32
          type: integer
        return_reasons_available:
          description: |-
            Return reasons available
            protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
          items:
            type: string
          type: array
        review_flow:
          description: Review flow
          type: string
        shopify_settings:
          allOf:
            - $ref: '#/components/schemas/pb.ShopifySettings'
          description: Optional -- only if Shopify
        slug:
          description: Identifier of the E-commerce (url-friendly)
          type: string
        store_list_url:
          description: List of URLs of the e-commerce that list the available stores
          type: string
        theme:
          allOf:
            - $ref: '#/components/schemas/pb.Theming'
          description: Theming
        use_case:
          description: Specifies the use case of ecommerce
          enum:
            - USE_CASE_UNSPECIFIED
            - USE_CASE_STANDARD
            - USE_CASE_GARANTIA
            - USE_CASE_INTERNAL
            - USE_CASE_LITE
          format: enum
          type: string
        warehouse_address:
          allOf:
            - $ref: '#/components/schemas/pb.Address'
          description: Address for warehouse
        woocommerce_settings:
          allOf:
            - $ref: '#/components/schemas/pb.WooCommerceSettings'
          description: Optional -- only if WooCommerce
      type: object
    pb.ERPSettings:
      description: ERP settings
      properties:
        id:
          description: ERP name
          enum:
            - ERP_UNSPECIFIED
            - HOLDED
          format: enum
          type: string
      type: object
    pb.Ecommerce:
      description: Ecommerce model
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        external_return_policy_url:
          description: external policy url
          type: string
        group:
          description: Group
          type: string
        is_enabled:
          description: IsEnabled
          type: boolean
        is_testing:
          description: IsTesting
          type: boolean
        name:
          description: name
          type: string
        orders_sync_disabled:
          description: OrdersSyncDisabled
          type: boolean
        platform:
          description: Platform
          type: string
        restocking_enabled:
          description: RestockingEnabled
          type: boolean
        slug:
          description: slug
          type: string
        use_case:
          description: UseCase
          type: string
        website_url:
          description: WebsiteURL
          type: string
      type: object
    pb.EcommerceMoney:
      properties:
        amount:
          description: amount of the money
          type: string
        currency:
          description: currency of the money
          type: string
      type: object
    pb.EcommerceOrder:
      description: |-
        Order the model for an order from any e-commerce (platform)
        Important! the alias at the end is for API docs generation
        @Description The model for an order from any e-commerce (platform)
        @name api.Order
      properties:
        billing_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: billing address of the order
        bxgy_discounts:
          description: list of buy X get Y discounts
          items:
            $ref: '#/components/schemas/pb.BxGyDiscount'
          type: array
        currency_customer:
          description: currency used by the customer
          type: string
        currency_shop:
          description: currency used in the e-commerce
          type: string
        customer:
          allOf:
            - $ref: '#/components/schemas/pb.OrderCustomer'
          description: customer associated to the order
        exchange_rate:
          description: exchange rate between the two currencies
          format: double
          type: number
        fulfilled_at:
          description: |-
            protolint:disable:next FIELD_NAMES_EXCLUDE_PREPOSITIONS
            date when the order was fulfilled
          format: date-time
          type: string
        identification:
          allOf:
            - $ref: '#/components/schemas/pb.OrderIdentification'
          description: identification of the order
        line_items:
          description: line items of the order
          items:
            $ref: '#/components/schemas/pb.OrderLineItem'
          type: array
        money_format:
          allOf:
            - $ref: '#/components/schemas/models.MoneyFormat'
          description: |-
            REVER 1.0 (Slice 1)
            To be deprecated -->
        payment:
          allOf:
            - $ref: '#/components/schemas/pb.Payment'
          description: payment method used to pay the order
        payment_methods:
          description: Payment methods used to pay the order in the e-commerce
          items:
            enum:
              - ORDERPM_UNKNOWN
              - ORDERPM_PROMO_CODE
              - ORDERPM_GIFT_CARD
              - ORDERPM_KLARNA
              - ORDERPM_OPM_NOT_SUPPORTED
            format: enum
            type: string
          type: array
        purchased_at:
          description: |-
            protolint:disable:next FIELD_NAMES_EXCLUDE_PREPOSITIONS
            date when the order was purchased
          format: date-time
          type: string
        retrieval:
          allOf:
            - $ref: '#/components/schemas/pb.OrderRetrieval'
          description: retrieval of the order
        shipping_address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: shipping address of the order
        shipping_costs:
          description: shipping costs of the order
          items:
            $ref: '#/components/schemas/pb.ShippingCost'
          type: array
        shipping_method_id:
          description: deprecated
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/pb.OrderStatus'
          description: status of the order
      type: object
    pb.EcommercePASettings:
      description: >-
        EcommercePASettings contains the Product Automations settings for an
        ecommerce
      properties:
        ecommerce_id:
          description: ID of the ecommerce
          type: string
        group:
          description: Group of the ecommerce
          type: string
        is_parent:
          description: >-
            If the ecommerce is the parent of the group (true if the ecommerce
            is the parent of the group)
          type: boolean
        sections:
          description: >-
            The settings object where each section contains multiple key-value
            pairs for settings
          items:
            $ref: '#/components/schemas/pb.PASection'
          type: array
      type: object
    pb.EcommerceReturnReason:
      description: return reason
      properties:
        category_ids:
          description: cateogry of the reason
          items:
            type: string
          type: array
        ecommerce_id:
          description: ecommerce id of th reason
          type: string
        hidden:
          description: hidden
          type: boolean
        name:
          description: name of the return reason
          type: string
      type: object
    pb.EvaluateRDVSurplusResponse:
      description: Evaluate RDV Surplus configuration response
      properties:
        surplus_amount:
          description: Surplus amount
          type: string
        surplus_percentage:
          description: Surplus percentage
          format: float
          type: number
      type: object
    pb.ExchangeCompensation:
      properties:
        exchange_order:
          $ref: '#/components/schemas/pb.ExchangeOrder'
        summary:
          $ref: '#/components/schemas/pb.CompensationSummary'
      type: object
    pb.ExchangeConditions:
      description: ExchangeConditions model
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        exchange_flow:
          description: exchange flow
          enum:
            - NO_EXCHANGE_FLOW
            - OPEN
            - ONE_ON_ONE
            - OPEN_WITH_GIFT_CARD
            - FULL
          format: enum
          type: string
        platform_main_menu_id:
          description: PlatformMainMenuID
          type: string
        threshold:
          description: Threshold
          format: int32
          type: integer
      type: object
    pb.ExchangeOrder:
      properties:
        amount:
          $ref: '#/components/schemas/pb.MoneyBag'
        created_at:
          format: date-time
          type: string
        order_number:
          type: string
      type: object
    pb.ExchangeOrderSettings:
      description: Settings for the exchange order created in the ecommerce platform
      properties:
        payment_method:
          description: |-
            Describe how inform the payment method of the exchange order
            Example: `SAME_AS_ORIGINAL` for using the same payment method
          type: string
        price:
          description: |-
            Describes how the total of the exchange order is affected, 
             just for accounting purposes. 
             Example: `FULL` for normal price. 
             Example: `ZERO` for creating the order in the e-commerce platform 
             with total zero value.
          type: string
        shipping_line:
          description: |-
            Describes how the shipping line will be created for the exchange 
             order in the e-commerce platform
             Examples:  CHEAPEST, ZERO
          type: string
      type: object
    pb.ExchangeOrderWithEcommerce:
      description: ExchangeOrder model
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        payment_method:
          description: PaymentMethod
          type: string
        price:
          description: Price
          type: string
        shipping_line:
          description: ShippingLine
          type: string
      type: object
    pb.ExportReturnProcessesRequest:
      properties:
        filters:
          $ref: '#/components/schemas/pb.ReturnProcessFilters'
      type: object
    pb.ExportReturnProcessesResponse:
      properties:
        download_url:
          type: string
      type: object
    pb.ExtraLineItem:
      properties:
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
        type:
          enum:
            - TYPE_UNSPECIFIED
            - TYPE_RETURN_SHIPPING_COST
            - TYPE_ORIGINAL_SHIPPING_REFUND
            - TYPE_KEEP_YOUR_ITEM
            - TYPE_RDV_SURPLUS
            - TYPE_SERVICE_FEE
            - TYPE_ORIGINAL_PROMOTION_BROKEN
          format: enum
          type: string
      type: object
    pb.ExtraLineItems:
      properties:
        extra_line_items:
          items:
            $ref: '#/components/schemas/pb.ExtraLineItem'
          type: array
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
      type: object
    pb.ExtraLineRequest:
      properties:
        name:
          description: Extra line name
          type: string
        price:
          description: Extra line price
          type: string
      type: object
    pb.FindProcessesByEmailAndEcommerceGroupResponse:
      properties:
        rever_returns_information:
          items:
            $ref: '#/components/schemas/pb.HelpDeskProcessData'
          type: array
      type: object
    pb.FindRefundConfigurationResponse:
      description: FindRefundConfigurationResponse
      properties:
        action_configs:
          description: ActionConfig
          items:
            $ref: '#/components/schemas/pb.ActionConfig'
          type: array
        ecommerce_id:
          description: ecommerce id
          type: string
        payment_method_configs:
          description: PaymentMethodConfig
          items:
            $ref: '#/components/schemas/pb.PaymentMethodConfig'
          type: array
        round_promocode:
          description: round_promocode
          type: boolean
      type: object
    pb.FlattenedEcommercePASettings:
      description: >-
        FlattenedEcommercePASettings is a flattened version of the ecommerce PA
        settings
      properties:
        settings:
          additionalProperties:
            type: string
          description: The flattened settings including ecommerce id and group
          type: object
      type: object
    pb.FraudDetectionSettings:
      description: Configuration for fraud detection
      properties:
        skip_fraud_detection:
          description: Flag to enable fraud detection
          type: boolean
      type: object
    pb.Fulfillment:
      properties:
        date:
          description: Fulfillment date
          format: date-time
          type: string
        id:
          description: Fulfillment ID
          type: string
        quantity:
          description: quantity of the item
          type: string
      type: object
    pb.FullExchangeSettings:
      description: Full exchange settings
      properties:
        website_main_menu_id:
          description: menu id of the website
          type: string
      type: object
    pb.Function:
      description: Function
      properties:
        comparisons:
          description: Comparisons
          items:
            type: string
          type: array
        name:
          description: Name of the function
          type: string
        values:
          description: Values
          items:
            type: string
          type: array
        variable:
          description: Variable
          type: string
      type: object
    pb.GenericCustomSettings:
      description: GenericCustomSettings
      properties:
        base_url:
          description: Base URL
          type: string
        group:
          description: Group
          type: string
        is_active:
          description: Is active
          type: boolean
        subplatform:
          description: Subplatform name
          type: string
      type: object
    pb.GetAuthorizationStatusResponse:
      properties:
        authorization_details:
          $ref: >-
            #/components/schemas/pb.GetAuthorizationStatusResponse_AuthorizationDetails
        authorization_status:
          enum:
            - AUTHORIZATION_STATUS_UNSPECIFIED
            - AUTHORIZATION_STATUS_AUTHORIZATION_PENDING
            - AUTHORIZATION_STATUS_DOCUMENT_UPLOAD_PENDING
            - AUTHORIZATION_STATUS_AUTHORIZED
            - AUTHORIZATION_STATUS_NOT_AUTHORIZED
            - AUTHORIZATION_STATUS_NO_AUTHORIZATION_REQUIRED
          format: enum
          type: string
        unauthorization_details:
          $ref: >-
            #/components/schemas/pb.GetAuthorizationStatusResponse_UnauthorizationDetails
      type: object
    pb.GetAuthorizationStatusResponse_AuthorizationDetails:
      properties:
        refund_override_amount:
          $ref: '#/components/schemas/pb.Money'
        refund_override_reason:
          type: string
        user:
          type: string
      type: object
    pb.GetAuthorizationStatusResponse_UnauthorizationDetails:
      properties:
        reason:
          type: string
        user:
          type: string
      type: object
    pb.GetAvailableRestockLocationsResponse:
      description: Available restock locations for the items in a process
      properties:
        item_restock_locations:
          description: Restock locations
          items:
            $ref: '#/components/schemas/pb.VariantRestockLocations'
          type: array
      type: object
    pb.GetLogisticSummariesResponse:
      properties:
        logistic_summaries:
          items:
            $ref: '#/components/schemas/pb.LogisticsSummaryWithProcessId'
          type: array
        pagination:
          $ref: '#/components/schemas/pb.Pagination'
      type: object
    pb.GetLogisticsSummaryResponse:
      properties:
        logistics_summary:
          $ref: '#/components/schemas/pb.LogisticsSummary'
      type: object
    pb.GetOnHoldWorkflowsResponse:
      properties:
        on_hold_workflows:
          items:
            $ref: '#/components/schemas/pb.GetOnHoldWorkflowsResponse_Workflow'
          type: array
      type: object
    pb.GetOnHoldWorkflowsResponse_Workflow:
      properties:
        basic_process_data:
          $ref: '#/components/schemas/pb.BasicProcessData'
        error_activity:
          type: string
        error_date:
          format: date-time
          type: string
        error_message:
          type: string
        responsible_team:
          enum:
            - TEAM_UNSPECIFIED
            - TEAM_RX
            - TEAM_EX
            - TEAM_PA
            - TEAM_TECH
          format: enum
          type: string
        workflow_id:
          type: string
        workflow_type:
          type: string
      type: object
    pb.GetOrderByOrderNumberAndEmailResponse:
      description: protolint:disable:next MESSAGE_NAMES_EXCLUDE_PREPOSITIONS
      properties:
        order:
          allOf:
            - $ref: '#/components/schemas/pb.EcommerceOrder'
          description: >-
            When the order is found, order data returned by the e-commerce
            platform

            processed to be standardized
      type: object
    pb.GetPrestashopModulesResponse:
      description: >-
        Response message containing Prestashop modules for a specific ecommerce
        ID
      properties:
        ecommerce_id:
          description: ID of the ecommerce platform
          type: string
        modules:
          description: List of Prestashop modules
          items:
            $ref: '#/components/schemas/pb.PrestashopModule'
          type: array
      type: object
    pb.GetPromocodeResponse:
      description: Response for the status of a promocode
      properties:
        ecommerce_id:
          description: Ecommerce id the promocode belongs to
          type: string
        enabled:
          description: Whether the promocode is enabled or not
          type: boolean
        order_ids:
          description: When available, the order_ids in where the promocode has been used
          items:
            type: string
          type: array
        promocode:
          description: Code of the promocode to be queried
          type: string
        used:
          description: If the promocode has been redeemed already (fully or partially)
          type: boolean
      type: object
    pb.GetRDVSurplusResponse:
      description: Get RDV Surplus configuration response
      properties:
        rules:
          description: Rules
          items:
            $ref: '#/components/schemas/pb.RDVSurplusRule'
          type: array
      type: object
    pb.GetRefundGatewaySettingsResponse:
      description: >-
        GetRefundGatewaySettingsResponse is the response for the
        GetRefundGatewaySettings method
      properties:
        ecommerce_id:
          description: Ecommerce ID
          type: string
        settings:
          allOf:
            - $ref: '#/components/schemas/pb.RefundGatewaySettings'
          description: Refund gateway settings
      type: object
    pb.GetResponse:
      description: Response for reading a return process
      properties:
        return_process:
          allOf:
            - $ref: '#/components/schemas/models.ReturnProcess'
          description: ReturnProcess recovered.
      type: object
    pb.GetRestockResponse:
      properties:
        restocks:
          description: List of restocks
          items:
            $ref: '#/components/schemas/pb.RestockDTO'
          type: array
      type: object
    pb.GetReturnAmountAvailableResponse:
      description: >-
        GetReturnAmountAvailableResponse is the response to get the return
        amount available
      properties:
        configurations:
          description: Return amount configurations
          items:
            $ref: '#/components/schemas/pb.Config'
          type: array
      type: object
    pb.GetReturnAmountResponse:
      description: GetReturnAmountResponse is the response to get the return amount
      properties:
        rules:
          description: Return amount business rules
          items:
            $ref: '#/components/schemas/pb.ReturnAmountRule'
          type: array
      type: object
    pb.GetReturnDocumentsResponse:
      properties:
        documents:
          items:
            $ref: '#/components/schemas/pb.GetReturnDocumentsResponse_Document'
          type: array
      type: object
    pb.GetReturnDocumentsResponse_Document:
      properties:
        document_information:
          type: string
        document_url:
          type: string
      type: object
    pb.GetReturnSummariesResponse:
      properties:
        pagination:
          $ref: '#/components/schemas/pb.Pagination'
        return_summaries:
          items:
            $ref: '#/components/schemas/pb.ReturnSummary'
          type: array
      type: object
    pb.GetReturnSummaryResponse:
      properties:
        return_summary:
          $ref: '#/components/schemas/pb.ReturnSummary'
      type: object
    pb.GetReviewsResponse:
      properties:
        item_reviews:
          items:
            $ref: '#/components/schemas/pb.ItemReview'
          type: array
      type: object
    pb.GetServiceFeesRes:
      description: Get service fees response
      properties:
        rules:
          description: Rules
          items:
            $ref: '#/components/schemas/pb.ServiceFeesRule'
          type: array
      type: object
    pb.GetWarehouseConfigResponse:
      description: GetWarehouseConfigResponse
      properties:
        ecommerce_id:
          description: Ecommerce ID
          type: string
        warehouse_configs:
          description: List of warehouses
          items:
            $ref: '#/components/schemas/pb.WarehouseConfig'
          type: array
      type: object
    pb.GetWarehouseRequest:
      description: GetWarehouseRequest
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/pb.Address'
          description: Address
        checkout_id:
          description: Checkout Id
          type: string
        ecommerce_id:
          description: ecommerce id
          type: string
        returning_items:
          description: ItemToReturn
          items:
            $ref: '#/components/schemas/pb.ReturningItem'
          type: array
      type: object
    pb.GetWarehouseResponse:
      description: GetWarehouseResponse
      properties:
        warehouse:
          allOf:
            - $ref: '#/components/schemas/pb.Warehouse'
          description: warehouse
      type: object
    pb.GetWorkflowsResponse:
      properties:
        workflows:
          items:
            $ref: '#/components/schemas/pb.Workflow'
          type: array
      type: object
    pb.GiftCard:
      properties:
        amount:
          $ref: '#/components/schemas/pb.MoneyBag'
        code:
          type: string
        created_at:
          format: date-time
          type: string
      type: object
    pb.GiftCardCompensation:
      properties:
        gift_card:
          $ref: '#/components/schemas/pb.GiftCard'
        summary:
          $ref: '#/components/schemas/pb.CompensationSummary'
      type: object
    pb.GroupSettingsResponse:
      description: List of settings
      properties:
        settings:
          description: List of settings corresponding to the e-commerces from the group
          items:
            $ref: '#/components/schemas/pb.ECommerceSettings'
          type: array
      type: object
    pb.HelpDeskProcessData:
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/pb.HelpDeskProcessData_ReturnAddress'
          description: Address
        customer:
          allOf:
            - $ref: '#/components/schemas/pb.HelpDeskProcessData_HelpDeskCustomer'
          description: Customer
        line_items:
          allOf:
            - $ref: >-
                #/components/schemas/pb.HelpDeskProcessData_HelpDeskReturnedItems
          description: Line Items
        logistics:
          allOf:
            - $ref: '#/components/schemas/pb.HelpDeskProcessData_HelpDeskLogistics'
          description: Logistics
        process_data:
          allOf:
            - $ref: >-
                #/components/schemas/pb.HelpDeskProcessData_HelpDeskBasicProcessData
          description: Basic Process Data
        return_costs:
          allOf:
            - $ref: >-
                #/components/schemas/pb.HelpDeskProcessData_HelpDeskReturnedItems
          description: Return Costs
        status:
          allOf:
            - $ref: '#/components/schemas/pb.HelpDeskProcessData_HelpDeskStatus'
          description: Status
        timings:
          allOf:
            - $ref: '#/components/schemas/pb.HelpDeskProcessData_HelpDeskTimings'
          description: Timings
      type: object
    pb.HelpDeskProcessData_HelpDeskAddress:
      properties:
        address_line_1:
          type: string
        address_line_2:
          type: string
        city:
          type: string
        country_code:
          type: string
        phone:
          type: string
        postal_code:
          type: string
      type: object
    pb.HelpDeskProcessData_HelpDeskBasicProcessData:
      properties:
        currency:
          description: Currency
          type: string
        ecommerce:
          description: Ecommerce
          type: string
        order_number:
          description: Order Number
          type: string
        platform:
          description: Platform
          type: string
        platform_value:
          description: Platform Values
          enum:
            - PLATFORM_VALUES_MOCK_UNSPECIFIED
            - PLATFORM_VALUES_WOOCOMMERCE
            - PLATFORM_VALUES_SHOPIFY
            - PLATFORM_VALUES_CUSTOM_GENERIC
            - PLATFORM_VALUES_PRESTASHOP
            - PLATFORM_VALUES_MAGENTO_V1
            - PLATFORM_VALUES_MAGENTO_V2
            - PLATFORM_VALUES_SALESFORCE
          format: enum
          type: string
        process_id:
          description: Process ID
          type: string
      type: object
    pb.HelpDeskProcessData_HelpDeskCustomer:
      properties:
        email:
          type: string
        first_name:
          type: string
        last_name:
          type: string
      type: object
    pb.HelpDeskProcessData_HelpDeskLogistics:
      properties:
        carrier:
          description: Carrier
          type: string
        return_method:
          description: Return method
          type: string
        return_method_enum:
          description: Return method Enum
          enum:
            - RETURN_METHOD_UNSPECIFIED
            - RETURN_METHOD_NO_RETURN_METHOD
            - RETURN_METHOD_PICK_UP
            - RETURN_METHOD_DROP_OFF
            - RETURN_METHOD_DELIVERY_PICKUP
            - RETURN_METHOD_IN_STORE
          format: enum
          type: string
        tracking_id:
          description: Tracking ID
          type: string
        tracking_url:
          description: Tracking URL
          type: string
      type: object
    pb.HelpDeskProcessData_HelpDeskReturnedItem:
      properties:
        product_info:
          $ref: '#/components/schemas/pb.HelpDeskReturnedItem_HelpDeskProductInfo'
        quantity:
          format: int32
          type: integer
        return_reason_key:
          type: string
        subtype:
          type: string
        total:
          type: string
        type:
          type: string
        unit_price:
          type: string
      type: object
    pb.HelpDeskProcessData_HelpDeskReturnedItems:
      properties:
        returned_items:
          items:
            $ref: '#/components/schemas/pb.HelpDeskProcessData_HelpDeskReturnedItem'
          type: array
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
      type: object
    pb.HelpDeskProcessData_HelpDeskStatus:
      properties:
        refunded:
          description: Refunded
          type: boolean
        shipping_status:
          description: Shipping Status
          type: string
        shipping_status_enum:
          description: Shipping Status Enum
          enum:
            - SHIPPING_STATUS_NO_SHIPPING_STATUS_UNSPECIFIED
            - SHIPPING_STATUS_CREATED
            - SHIPPING_STATUS_COLLECTED
            - SHIPPING_STATUS_IN_WAREHOUSE
            - SHIPPING_STATUS_ERROR
            - SHIPPING_STATUS_CANCELED
          format: enum
          type: string
      type: object
    pb.HelpDeskProcessData_HelpDeskTimings:
      properties:
        returned_at:
          description: Returned At
          format: date-time
          type: string
        started_at:
          description: Started At
          format: date-time
          type: string
      type: object
    pb.HelpDeskProcessData_ReturnAddress:
      properties:
        drop_off_address:
          allOf:
            - $ref: '#/components/schemas/pb.HelpDeskProcessData_HelpDeskAddress'
          description: Drop Off Address
        exchange:
          allOf:
            - $ref: '#/components/schemas/pb.HelpDeskProcessData_HelpDeskAddress'
          description: Exchange Shipping Address
        pickup_address:
          allOf:
            - $ref: '#/components/schemas/pb.HelpDeskProcessData_HelpDeskAddress'
          description: Pickup Address
      type: object
    pb.HelpDeskReturnedItem_HelpDeskProductInfo:
      properties:
        image_url:
          type: string
        product_name:
          type: string
        variant_name:
          type: string
      type: object
    pb.InvoicingInformation:
      description: Invoicing information for an e-commerce
      properties:
        ecommerce_id:
          description: The id of the e-commerce.
          type: string
        stripe_customer_id:
          description: The stripe customer id
          type: string
      type: object
    pb.ItemProduct:
      description: Item product from item to return
      properties:
        category_ids:
          description: The list of categories
          items:
            type: string
          type: array
        collection_ids:
          description: The list of collections
          items:
            type: string
          type: array
        product_id:
          description: The ID of the product
          type: string
        tag_ids:
          description: The list of tags
          items:
            type: string
          type: array
        variant_id:
          description: The ID of the variant
          type: string
      type: object
    pb.ItemReview:
      properties:
        outcome:
          enum:
            - OUTCOME_UNSPECIFIED
            - OUTCOME_APPROVED
            - OUTCOME_DECLINED
            - OUTCOME_MISSING
          format: enum
          type: string
        reject_reason:
          type: string
        returned_item_rever_id:
          type: string
        user:
          type: string
      type: object
    pb.KeepYourItem:
      description: KeepYourItem
      properties:
        enabled:
          description: enabled
          type: boolean
        options:
          description: options
          items:
            $ref: '#/components/schemas/pb.KeepYourItemOptions'
          type: array
      type: object
    pb.KeepYourItemOptions:
      description: KeepYourItemOption request
      properties:
        force_keep_your_item:
          description: ForceKeepYourItem
          type: boolean
        refund_percentage:
          description: refund percentage
          format: float
          type: number
        whens:
          description: when
          items:
            type: string
          type: array
      type: object
    pb.KlarnaGatewaySettings:
      description: KlarnaGatewaySettings is the settings for the Klarna gateway
      properties:
        environment:
          description: Environment
          enum:
            - ENVIRONMENT_UNSPECIFIED
            - ENVIRONMENT_PRODUCTION
            - ENVIRONMENT_DEVELOPMENT
            - ENVIRONMENT_SANDBOX
          format: enum
          type: string
        is_active:
          description: Is active
          type: boolean
        password:
          description: Password
          type: string
        username:
          description: Username
          type: string
      type: object
    pb.LanguageCopies:
      description: Copies for a given language
      properties:
        copies:
          description: List of copies for a given e-commerce
          items:
            $ref: '#/components/schemas/pb.CopyDetails'
          type: array
        language:
          description: Language of the copies
          enum:
            - UNSPECIFIED
            - EN
            - FR
            - ES
            - IT
            - DE
            - PT
          format: enum
          type: string
      type: object
    pb.LogicommercePaymentPlatforms:
      properties:
        bizum:
          description: Bizum platform name
          type: string
        paypal:
          description: Paypal platform name
          type: string
        redsys:
          description: Redsys platform name
          type: string
        sequra:
          description: Sequra platform name
          type: string
      type: object
    pb.LogicommerceSettings:
      description: LogicommerceSettings
      properties:
        app_id:
          description: App ID
          type: string
        app_key:
          description: Api token
          type: string
        is_sandbox:
          description: Is sandbox ecommerce
          type: boolean
        payment_platforms:
          allOf:
            - $ref: '#/components/schemas/pb.LogicommercePaymentPlatforms'
          description: Payment platforms
        version:
          description: Logicommerce version
          type: string
      type: object
    pb.LogisticSetting:
      description: LogisticSetting model
      properties:
        delivery_note_type:
          description: DeliveryNoteType
          type: string
        ecommerce_id:
          description: EcommerceID
          type: string
        reminder_flow:
          description: ReminderFlow
          type: string
        return_logistics:
          description: ReturnLogistics
          items:
            $ref: '#/components/schemas/pb.ReturnLogistics'
          type: array
        store_list_url:
          description: StoreListUrl
          type: string
      type: object
    pb.LogisticsSummary:
      properties:
        carrier:
          type: string
        pickups_scheduled:
          type: string
        return_method:
          enum:
            - RETURN_METHOD_UNSPECIFIED
            - RETURN_METHOD_NO_RETURN_METHOD
            - RETURN_METHOD_PICK_UP
            - RETURN_METHOD_DROP_OFF
            - RETURN_METHOD_DELIVERY_PICKUP
            - RETURN_METHOD_IN_STORE
          format: enum
          type: string
        status:
          enum:
            - STATUS_UNSPECIFIED
            - STATUS_NO_SHIPPING_STATUS
            - STATUS_CREATED
            - STATUS_COLLECTED
            - STATUS_IN_WAREHOUSE
            - STATUS_CANCELED
          format: enum
          type: string
        tracking_id:
          type: string
        tracking_url:
          type: string
      type: object
    pb.LogisticsSummaryWithProcessId:
      properties:
        logistics_summary:
          $ref: '#/components/schemas/pb.LogisticsSummary'
        process_id:
          type: string
      type: object
    pb.MagentoV1Settings:
      description: 'TODO: explain better these fields'
      properties:
        access_token:
          description: access token to authenticate with the API
          type: string
        access_token_secret:
          description: access token secret to authenticate with the API
          type: string
        admin_url:
          description: URL of the admin panel
          type: string
        api_base_url:
          description: Base URL of the API to communicate with the e-commerce
          type: string
        api_key:
          description: API key
          type: string
        consumer_key:
          description: consumer key
          type: string
        consumer_secret:
          description: consumer secret
          type: string
        user:
          description: user to authenticate with the API
          type: string
        version:
          description: Version of the API
          type: string
      type: object
    pb.MagentoV2Settings:
      description: Specific settings for an e-commerce using the Magento platform
      properties:
        access_token:
          description: Access token to authenticate with the API
          type: string
        access_token_secret:
          description: Access token secret to authenticate with the API
          type: string
        admin_url:
          description: URL of the admin panel
          type: string
        api_base_url:
          description: Base URL of the API to communicate with the e-commerce
          type: string
        api_key:
          description: API key
          type: string
        auth_strategy:
          description: Authentication strategy to use (BEARER_TOKEN or OAUTH_1)
          enum:
            - BEARER_TOKEN
            - OAUTH_1
            - APIKEY
            - OAUTH2
          format: enum
          type: string
        consumer_key:
          description: consumer key
          type: string
        consumer_secret:
          description: consumer secret
          type: string
        integration_type:
          description: Returns Integration type
          enum:
            - INTEGRATION_TYPE_UNSPECIFIED
            - INTEGRATION_TYPE_ONLY_START
            - INTEGRATION_TYPE_FULL
            - INTEGRATION_TYPE_NONE
          format: enum
          type: string
        module_release_url:
          description: URL of the module release appointing to the module github
          type: string
        order_status_settings:
          allOf:
            - $ref: '#/components/schemas/pb.OrderStatusSettings'
          description: Specific settings related to managing order statuses
        price_excludes_taxes:
          description: PriceExcludesTaxes
          type: boolean
        product_attributes:
          allOf:
            - $ref: '#/components/schemas/pb.ProductAttributes'
          description: List of attributes that are used to identify a product
        user:
          description: user to authenticate with the API
          type: string
        version:
          description: Version of the API
          type: string
      type: object
    pb.MailTheme:
      description: Branding options for emails
      properties:
        logo_url:
          description: |-
            URL of the logo to be displayed in emails. 
             Important! Must be a URL stored in REVER platform
             for not impacting in the email deliverability / reputation
          type: string
        main_color:
          description: Reference color for the color palette used in emails
          type: string
      type: object
    pb.MarkAsRefundedRequest:
      properties:
        currency:
          description: Currency of the order
          type: string
        extra_lines:
          description: Extra lines of the credit note
          items:
            $ref: '#/components/schemas/pb.ExtraLineRequest'
          type: array
        line_items:
          description: Items of the credit note
          items:
            $ref: '#/components/schemas/pb.RefundedLineItems'
          type: array
        order_id:
          description: Order ID
          type: string
        order_reference:
          description: Order reference
          type: string
        process_id:
          description: Process id
          type: string
        return_process_platform_id:
          description: return process platform id
          type: string
        total_amount:
          allOf:
            - $ref: '#/components/schemas/pb.EcommerceMoney'
          description: total amount to refund of the order
        total_amount_shop:
          allOf:
            - $ref: '#/components/schemas/pb.EcommerceMoney'
          description: total amount to refund in shop currency
      type: object
    pb.MarkAsRefundedResponse:
      properties:
        credit_note_id:
          description: Credit note id
          type: string
        ecommerce_id:
          description: Ecommerce id
          type: string
        process_id:
          description: Process id
          type: string
      type: object
    pb.MeResponse:
      description: MeResponse for dashboard auth request
      properties:
        id:
          description: ID
          type: string
        user:
          allOf:
            - $ref: '#/components/schemas/pb.User'
          description: User
      type: object
    pb.MiraklPlatformSettings:
      description: Mirakl platform settings
      properties:
        api_key:
          description: Api key
          type: string
        marketplace_id:
          description: Marketplace ID
          format: int32
          type: integer
      type: object
    pb.Money:
      properties:
        amount:
          type: string
        currency_code:
          type: string
      type: object
    pb.MoneyBag:
      properties:
        presentment_money:
          $ref: '#/components/schemas/pb.Money'
      type: object
    pb.NewReturnReason:
      description: new return reason to add to the db
      properties:
        category_ids:
          description: category id of the return reason
          items:
            type: string
          type: array
        hidden:
          description: hidden
          type: boolean
        name:
          description: name of the return reason
          type: string
      type: object
    pb.NonReturnableItem:
      properties:
        quantity:
          description: quantity of the item
          format: int32
          type: integer
        reason:
          description: reason why the item is not returnable
          enum:
            - NO_VALUE
            - IN_PROGRESS
            - RETURNED
            - NON_RETURNABLE
            - NOT_FULFILLED
            - OUT_OF_RETURN_PERIOD
            - PARENT_NOT_COMPLETED
            - PLATFORM
          format: enum
          type: string
      type: object
    pb.NonReturnableItems:
      description: |-
        List of ids, tags, etc that could be used to identify when a product
        should be non-returnable
      properties:
        brand_ids:
          description: |-
            IDs (e-commerce platform dependant) of the brands
            associated to non-returnable products
          items:
            type: string
          type: array
        category_ids:
          description: |-
            IDs (e-commerce platform dependant) of the categories
            that contain non-returnable products
          items:
            type: string
          type: array
        collection_ids:
          description: |-
            Collection IDs (e-commerce platform dependant) associated to
            non-returnable products
          items:
            type: string
          type: array
        order_tags_ids:
          description: |-
            IDs (e-commerce platform dependant) associated to
            tags that are associated to orders that have products
            considered non-returnable
          items:
            type: string
          type: array
        product_ids:
          description: IDs (e-commerce platform) of non-returnable products
          items:
            type: string
          type: array
        tag_ids:
          description: |-
            Tag IDs (e-commerce platform dependant) associated to 
             non-returnable products
          items:
            type: string
          type: array
      type: object
    pb.OnboardingRequest:
      description: OnboardingRequest is the request to onboard an e-commerce
      properties:
        brand_information:
          allOf:
            - $ref: '#/components/schemas/pb.BrandInformation'
          description: Brand Information
        dashboard_users:
          allOf:
            - $ref: '#/components/schemas/pb.DashboardUsers'
          description: Dashboard Users
        ecommerce_id:
          description: The id of the e-commerce.
          type: string
        refund_conditions:
          allOf:
            - $ref: '#/components/schemas/pb.RefundConditions'
          description: Refund Conditions
        return_amounts:
          allOf:
            - $ref: '#/components/schemas/pb.PostReturnAmountRequest'
          description: Return costs rules
        return_conditions:
          allOf:
            - $ref: '#/components/schemas/pb.ReturnConditions'
          description: Return Conditions
        return_reasons:
          allOf:
            - $ref: '#/components/schemas/pb.SaveReturnReasonsReq'
          description: Return Reasons
        warehouse_address:
          allOf:
            - $ref: '#/components/schemas/pb.WarehouseAddress'
          description: Warehouse Address
      type: object
    pb.OnboardingResponse:
      description: OnboardingResponse is the response to onboard an e-commerce
      type: object
    pb.OpenExchangeItem:
      properties:
        product_name:
          type: string
        quantity:
          format: int32
          type: integer
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
      type: object
    pb.OpenExchangeItems:
      properties:
        open_exchange_items:
          items:
            $ref: '#/components/schemas/pb.OpenExchangeItem'
          type: array
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
      type: object
    pb.OrderCustomer:
      description: |-
        OrderCustomer
        Important! the alias at the end is for API docs generation
        @Description Customer associated to the order
        @name api.OrderCustomer
      properties:
        email:
          description: Customer email
          type: string
        first_name:
          description: Customer first name
          type: string
        last_name:
          description: Customer last name
          type: string
      type: object
    pb.OrderIdentification:
      description: |-
        OrderIdentification keeps the data for identifying an order within the
        Rever platform and the e-commerce platform
        Important! the alias at the end is for API docs generation
        @Description Extended data for identifying an order in any e-commerce
        @name api.OrderIdentification
      properties:
        customer_printed_order_id:
          description: order number sent to the client
          type: string
        ecommerce_id:
          description: Internal Rever e-commerce_id
          type: string
        id:
          description: |-
            Shopify:id   Woo: id --> Not usually visible by end-users. 
             Unique identifier in the origin platform
          type: string
        platform:
          description: Platform from where this order was retrieved
          enum:
            - MOCK
            - WOOCOMMERCE
            - SHOPIFY
            - CUSTOM_GENERIC
            - PRESTASHOP
            - MAGENTO_V1
            - MAGENTO_V2
            - SALESFORCE
          format: enum
          type: string
        rever_id:
          description: Unique ID in the rever platform
          type: string
      type: object
    pb.OrderLineItem:
      description: |-
        OrderLineItem
        Important! the alias at the end is for API docs generation
        @Description One of the line items from the Order
      properties:
        comment:
          description: 'Optional: when a customer send some comments'
          type: string
        discount_codes:
          description: Discount codes used to purchase the item
          items:
            $ref: '#/components/schemas/pb.DiscountCode'
          type: array
        ean:
          description: >-
            Optional: ean for products from the order (International Article
            Number)
          type: string
        fulfillments:
          description: Fulfillments
          items:
            $ref: '#/components/schemas/pb.Fulfillment'
          type: array
        id:
          description: Id of the line item in the source platform
          type: string
        name:
          description: Name of the line item (not necessarily the name of the product)
          type: string
        non_returnable_items:
          description: 'Optional: Information about non-returnable items'
          items:
            $ref: '#/components/schemas/pb.NonReturnableItem'
          type: array
        product:
          allOf:
            - $ref: '#/components/schemas/pb.Product'
          description: >-
            Optional payload of the product (with variations) specified in the
            field product_id
        product_id:
          description: to get product details, request the product (API)
          type: string
        quantity:
          description: number of items of the same product + variant
          format: int32
          type: integer
        return_reason:
          description: deprecated
          enum:
            - NO_RETURN_REASON
            - WRONG_SIZE
            - WRONG_COLOR
            - NOT_AS_EXPECTED
            - DEFECTIVE
            - CHANGED_MY_MIND
            - WRONG_ITEM
            - WRONG_SIZE_TOO_SMALL
            - WRONG_SIZE_TOO_BIG
          format: enum
          type: string
        returns_completed_count:
          description: Returns completed count
          type: string
        returns_in_progress_count:
          description: Returns in progress count
          type: string
        rever_id:
          description: Id of the line item in rever system
          type: string
        sku:
          description: |-
            stock-keeping unit (SKU) is a scannable bar code, 
             most often seen printed on product labels in a retail store
          type: string
        subtotal:
          description: |-
            sub total amount of the line following the MoneyFormat of the order
            before discounts and taxes
            subtotal = unit_price * quantity
          type: string
        total:
          description: >-
            total amount of the line following the MoneyFormat of the order

            including discounts and tax

            total = (subtotal - total_discounts) + total_taxes

            this is the amount to be refunded (multiplied by
            items_returned/quantity)
          type: string
        total_discounts:
          description: total amount of discounts of the line following the MoneyFormat
          type: string
        total_taxes:
          description: total amount of taxes of the line following the MoneyFormat
          type: string
        unit_price:
          description: |-
            unit price of a single  item (no discounts, no taxes)
             follows MoneyFormat associated
             WARNING: This price can have roundings as some platforms 
             only share the unit_price + taxes.
             Depending on the use case might be better to use the total directly 
             and add/substract taxes/discounts
          type: string
        variant_id:
          description: |-
            variant of the product (same ProductID, different Variant)
            we are allowing only one variant at the moment (one dimension)
          type: string
        variant_name:
          description: Name of the variant
          type: string
        weight:
          description: weight for products from the order
          type: string
      type: object
    pb.OrderRetrieval:
      description: |-
        OrderRetrieval keeps data relative to how
        this data was retrieved
        Important! the alias at the end is for API docs generation
        @Description information on how this order was retrieved
        @name api.OrderRetrieval
      properties:
        date:
          description: >-
            The timestamp where this data was retrieved from the corresponding
            endpoint

            RFC3339 format
          format: date-time
          type: string
        source:
          description: Source URL for this order
          type: string
      type: object
    pb.OrderStatus:
      description: >-
        OrderStatus keeps track of transient data of the order

        Important! the alias at the end is for API docs generation

        @Description Order status with time it was considered as PAID -- returns
        policy

        uses this date as starting time
      properties:
        customer_printed_date:
          description: |-
            The date since the returns policy starts counting at
            Shopify: processed_at (verify) Woo: date_paid (verify)
            RFC3399 format
          format: date-time
          type: string
        status:
          description: 'Status of the order. TODO: Available statuses'
          type: string
      type: object
    pb.OrderStatusSettings:
      description: |-
        Specific settings related to the order status of 
         an e-commerce using the Magento platform
         the ids represent the Magento order status ids
      properties:
        partially_returned_code:
          description: 'TODO: improve description'
          type: string
        processing_code:
          description: 'TODO: improve description'
          type: string
        return_completed_code:
          description: 'TODO: improve description'
          type: string
        return_started_code:
          description: 'TODO: improve description'
          type: string
      type: object
    pb.OrderedItem:
      properties:
        product_id:
          type: string
        product_name:
          type: string
        quantity:
          format: int32
          type: integer
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
        variant_id:
          type: string
        variant_name:
          type: string
      type: object
    pb.OrderedItems:
      properties:
        ordered_items:
          items:
            $ref: '#/components/schemas/pb.OrderedItem'
          type: array
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
      type: object
    pb.OriginalPaymentMethodCompensation:
      properties:
        bt_fallback_triggered:
          type: boolean
        refunds:
          items:
            $ref: '#/components/schemas/pb.OriginalPaymentMethodRefund'
          type: array
        summary:
          $ref: '#/components/schemas/pb.CompensationSummary'
      type: object
    pb.OriginalPaymentMethodRefund:
      properties:
        amount:
          $ref: '#/components/schemas/pb.MoneyBag'
        created_at:
          format: date-time
          type: string
      type: object
    pb.OwnPlatformEndpoints:
      description: Own platform endpoints
      properties:
        complete_return:
          description: completeReturn endpoint
          type: string
        create_order:
          description: createOrder endpoint
          type: string
        create_promocode:
          description: createPromocode endpoint
          type: string
        delete_promocode:
          description: deletePromocode endpoint
          type: string
        get_order:
          description: getOrder endpoint
          type: string
      type: object
    pb.OwnPlatformSettings:
      description: Own platform settings
      properties:
        api_key:
          description: Api key
          type: string
        endpoints:
          allOf:
            - $ref: '#/components/schemas/pb.OwnPlatformEndpoints'
          description: Own platform endpoints
        header_key:
          description: Header key
          type: string
        version:
          description: What version of the custom platform is this (for now only 1)
          type: string
      type: object
    pb.PANewSetting:
      description: PANewSettings defines the structure of a new setting
      properties:
        default_value:
          description: A string containing the new setting default
          type: string
        name:
          description: A string containing the new setting name
          type: string
      type: object
    pb.PASection:
      description: PASection contains the settings for a section
      properties:
        id:
          description: The section id
          type: string
        settings:
          additionalProperties:
            type: string
          description: The section settings
          type: object
      type: object
    pb.Pagination:
      properties:
        current_page:
          format: int32
          type: integer
        page_size:
          format: int32
          type: integer
        total_pages:
          format: int32
          type: integer
      type: object
    pb.Param:
      description: Param
      properties:
        name:
          description: Name of the param
          type: string
        type:
          description: Type of the param
          type: string
      type: object
    pb.PatchReturnProcessRequest:
      description: Payload for updating a return process via PATCH
      properties:
        patch:
          description: Preferred. map[string]interface{} as a json string
          type: string
        process_id:
          description: ID of the process to be updated. Required.
          type: string
        return_process_patch:
          allOf:
            - type: object
              additionalProperties: true
          description: any json object with the return process structure
        user:
          description: User doing the patch
          type: string
      type: object
    pb.PatchReturnProcessResponse:
      properties:
        new_last_known_shipping_status:
          description: value of the field `last_known_shipping_status` after the update
          enum:
            - NO_SHIPPING_STATUS
            - CREATED
            - COLLECTED
            - IN_WAREHOUSE
            - ERROR
            - CANCELED
          format: enum
          type: string
        previous_last_known_shipping_status:
          description: value of the field `last_known_shipping_status` before the update
          enum:
            - NO_SHIPPING_STATUS
            - CREATED
            - COLLECTED
            - IN_WAREHOUSE
            - ERROR
            - CANCELED
          format: enum
          type: string
      type: object
    pb.PayForLogistics:
      description: PayForLogistics request
      properties:
        always:
          description: always
          type: boolean
        options:
          description: options
          items:
            $ref: '#/components/schemas/pb.PayForLogisticsOption'
          type: array
      type: object
    pb.PayForLogisticsOption:
      description: request to know if we should pay for logistics
      properties:
        whens:
          description: when
          items:
            type: string
          type: array
      type: object
    pb.PayPalGatewaySettings:
      description: PayPalGatewaySettings is the settings for the PayPal gateway
      properties:
        client_id:
          description: Client ID
          type: string
        environment:
          description: Environment
          enum:
            - ENVIRONMENT_UNSPECIFIED
            - ENVIRONMENT_PRODUCTION
            - ENVIRONMENT_DEVELOPMENT
            - ENVIRONMENT_SANDBOX
          format: enum
          type: string
        is_active:
          description: Is active
          type: boolean
        secret_key:
          description: Secret key
          type: string
      type: object
    pb.Payment:
      description: Payment keeps the data for the payment method used to pay an order
      properties:
        gateway:
          description: gateway used to pay the order
          type: string
      type: object
    pb.PaymentMethodConfig:
      description: PaymentMethodConfig
      properties:
        name:
          description: Name
          type: string
        timing:
          description: Timing
          type: string
        whens:
          description: Whens
          items:
            type: string
          type: array
      type: object
    pb.PostReturnAmountRequest:
      description: PostReturnAmountRequest is the request to post the return amount
      properties:
        ecommerce_id:
          description: The id of the e-commerce.
          type: string
        rules:
          description: Return amount business rules
          items:
            $ref: '#/components/schemas/pb.ReturnAmountRule'
          type: array
      type: object
    pb.PostReturnAmountResponse:
      description: PostReturnAmountResponse is the response to post the return amount
      type: object
    pb.PrestashopModule:
      description: Represents a Prestashop module with its properties
      properties:
        active:
          description: Whether the module is currently active/enabled
          type: boolean
        author:
          description: Author/developer of the module
          type: string
        description:
          description: Description of the module's functionality
          type: string
        display_name:
          description: Display name shown in the admin interface
          type: string
        name:
          description: Technical name/identifier of the module
          type: string
        version:
          description: Version number of the module
          type: string
      type: object
    pb.PrestashopSettings:
      description: Specific settings for an e-commerce using the Prestashop platform
      properties:
        admin_url:
          description: URL of the admin panel
          type: string
        api_base_url:
          description: Base URL of the API to communicate with the e-commerce
          type: string
        api_key:
          description: api key
          type: string
        api_module_path:
          description: Installation path of the REVER Prestashop module
          type: string
        use_query_string_auth:
          description: |-
            whether authentication with Prestashop is done with query string
            or using the header. Default: false (header)
          type: boolean
      type: object
    pb.Product:
      description: |-
        Product models any product from any e-commerce platform
        Important! the alias at the end is for API docs generation
        @Description A product from the e-commerce
        @name api.Product
      properties:
        categories:
          description: 'Optional: product categories'
          items:
            $ref: '#/components/schemas/pb.ProductCategory'
          type: array
        collections:
          description: 'Optional: product collections'
          items:
            $ref: '#/components/schemas/pb.Collection'
          type: array
        description:
          description: Product description
          type: string
        id:
          description: Unique identifier for the resource in the source platform
          type: string
        images:
          description: Images associated to the product
          items:
            $ref: '#/components/schemas/pb.ProductImage'
          type: array
        money_format:
          allOf:
            - $ref: '#/components/schemas/models.MoneyFormat'
          description: format for the amounts
        name:
          description: Product name
          type: string
        platform:
          description: platform from where this product comes from
          enum:
            - MOCK
            - WOOCOMMERCE
            - SHOPIFY
            - CUSTOM_GENERIC
            - PRESTASHOP
            - MAGENTO_V1
            - MAGENTO_V2
            - SALESFORCE
          format: enum
          type: string
        price:
          description: price per unit (following MoneyFormat)
          type: string
        product_reference:
          description: 'Optional: product reference'
          type: string
        short_description:
          description: Product short description
          type: string
        sku:
          description: unique identifier of the product
          type: string
        tags:
          description: 'Optional: product tags'
          items:
            $ref: '#/components/schemas/pb.Tag'
          type: array
        variants:
          description: >-
            Optional: product variations

            if a line-item references a varition, the attributes of the
            variation

            have to be used instead of the ones of the product
          items:
            $ref: '#/components/schemas/pb.ProductVariant'
          type: array
      type: object
    pb.ProductAttribute:
      description: Magento Product Attribute
      properties:
        platform_code:
          description: Name of the attribute
          type: string
      type: object
    pb.ProductAttributes:
      description: Magento Product Attributes
      properties:
        ean:
          allOf:
            - $ref: '#/components/schemas/pb.ProductAttribute'
          description: ean attribute
      type: object
    pb.ProductCategory:
      properties:
        id:
          description: Unique identifier for the resource in the source platform
          type: string
      type: object
    pb.ProductImage:
      description: |-
        Image
        Alias is for API docs generation
        Important! the alias at the end is for API docs generation
        @Description An image from the e-commerce catalog
        @name api.Image
      properties:
        alt:
          description: Image alternative text
          type: string
        name:
          description: Image name
          type: string
        src:
          description: Image URL
          type: string
      type: object
    pb.ProductOption:
      properties:
        id:
          description: Unique identifier for the resource in the source platform
          type: string
        name:
          description: Name of the option
          type: string
        value:
          description: Value of the option
          type: string
      type: object
    pb.ProductVariant:
      properties:
        barcode:
          description: barcode for product
          type: string
        description:
          description: Variant description
          type: string
        enabled:
          description: enabled or disabled
          type: boolean
        id:
          description: Unique identifier for the resource in the source platform
          type: string
        images:
          description: Images associated to the variant
          items:
            $ref: '#/components/schemas/pb.ProductImage'
          type: array
        inventory_quantity:
          description: inventory quantity (only check if inventory_enabled is true)
          type: string
        is_inventory_enabled:
          description: should be checked before checking quantity
          type: boolean
        name:
          description: Name of the variant
          type: string
        options:
          description: The list of options that conforms this variant
          items:
            $ref: '#/components/schemas/pb.ProductOption'
          type: array
        price:
          description: unit price
          type: string
        short_description:
          description: Variant short description
          type: string
        sku:
          description: unique identifier of the product
          type: string
        weight:
          description: weight for product
          type: string
      type: object
    pb.Promocode:
      properties:
        amount:
          $ref: '#/components/schemas/pb.MoneyBag'
        code:
          type: string
        created_at:
          format: date-time
          type: string
      type: object
    pb.PromocodeCompensation:
      properties:
        amount:
          $ref: '#/components/schemas/pb.MoneyBag'
        promocode:
          $ref: '#/components/schemas/pb.Promocode'
        summary:
          $ref: '#/components/schemas/pb.CompensationSummary'
      type: object
    pb.RDVSurplusRule:
      description: RDVSurplusRule for the RDV Surplus BR
      properties:
        surplus_amount:
          description: Surplus amount
          type: string
        surplus_percentage:
          description: Surplus percentage
          format: float
          type: number
        whens:
          description: When conditions to evaluate
          items:
            type: string
          type: array
      type: object
    pb.RateLimitTestResponse:
      type: object
    pb.Refund:
      description: |-
        Configuration of what REVER can offer as counterpart for a return 
         (refund, exchange, etc). The word refund is used as a generic term for any
         type of counterpart although it's not 100% accurate
      properties:
        action_configs:
          description: List of actions available for executing refunds
          items:
            $ref: '#/components/schemas/models.RefundActionConfig'
          type: array
        actions:
          description: |-
            Counterparts that can be offered for a return.
            Deprecated. Use `action_configs` instead
          items:
            enum:
              - NO_ACTION
              - TO_EXCHANGE
              - TO_RETURN
            format: enum
            type: string
          type: array
        exchange_flow:
          description: >-
            As exchanges as refunds can be performed in several ways, which
            strategy

            must be used
          enum:
            - NO_EXCHANGE_FLOW
            - OPEN
            - ONE_ON_ONE
            - OPEN_WITH_GIFT_CARD
            - FULL
          format: enum
          type: string
        payment_method_configs:
          description: List of payment methods available for executing refunds
          items:
            $ref: '#/components/schemas/models.RefundPaymentMethodConfig'
          type: array
        payment_methods:
          description: |-
            List of payment methods available for executing refunds
            Deprecated. Use `payment_method_configs` instead
          items:
            enum:
              - NO_PAYMENT_METHOD
              - BANK_TRANSFER
              - ORIGINAL
              - PROMO_CODE
              - GIFT_CARD
              - MANUAL
            format: enum
            type: string
          type: array
        round_promocode:
          description: >-
            Whether promocode generated must be rounded to the nearest integer
            or not

            Default: false
          type: boolean
        timing:
          description: |-
            At what point of the return workflow,
            the selected refund action will be executed
          enum:
            - NO_TIMING
            - ON_START_RETURN_PROCESS
            - ON_ITEM_SENT
            - ON_ITEM_VERIFIED
          format: enum
          type: string
      type: object
    pb.RefundConditions:
      description: RefundConditions contains the conditions for refunds
      properties:
        exchange:
          description: exchange
          type: boolean
        fallback_bank_transfer:
          description: fallback bank transfer
          type: boolean
        refund_methods:
          description: refund methods
          items:
            enum:
              - NO_PAYMENT_METHOD
              - BANK_TRANSFER
              - ORIGINAL
              - PROMO_CODE
              - GIFT_CARD
              - MANUAL
            format: enum
            type: string
          type: array
        timing:
          description: timing
          enum:
            - NO_TIMING
            - ON_START_RETURN_PROCESS
            - ON_ITEM_SENT
            - ON_ITEM_VERIFIED
          format: enum
          type: string
      type: object
    pb.RefundGatewaySettings:
      description: RefundGatewaySettings is the settings for the refund gateway
      properties:
        axerve:
          allOf:
            - $ref: '#/components/schemas/pb.AxerveGatewaySettings'
          description: Axerve settings
        klarna:
          allOf:
            - $ref: '#/components/schemas/pb.KlarnaGatewaySettings'
          description: Klarna settings
        paypal:
          allOf:
            - $ref: '#/components/schemas/pb.PayPalGatewaySettings'
          description: PayPal settings
      type: object
    pb.RefundOverride:
      properties:
        amount:
          $ref: '#/components/schemas/pb.Money'
        reason:
          type: string
        requested:
          type: boolean
      type: object
    pb.RefundedLineItems:
      properties:
        line_item_id:
          description: line item id
          type: string
        name:
          description: Item name
          type: string
        price:
          description: Item price
          type: string
        quantity:
          description: Item quantity
          type: string
        sku:
          description: Item sku
          type: string
      type: object
    pb.RequestCustomerUploadPhotosRequest:
      properties:
        ecommerce_message:
          description: Ecommerce message
          type: string
        process_id:
          description: Process ID.
          type: string
      type: object
    pb.RequestCustomerUploadPhotosResponse:
      type: object
    pb.RequireAuthorization:
      description: require authorization request
      properties:
        always:
          description: always
          type: boolean
        options:
          description: options
          items:
            $ref: '#/components/schemas/pb.RequireAuthorizationOption'
          type: array
      type: object
    pb.RequireAuthorizationOption:
      description: RequireAuthorizationOption request
      properties:
        whens:
          description: when
          items:
            type: string
          type: array
      type: object
    pb.ResponsiveStyle:
      description: 'TODO: enhance description'
      properties:
        desktop:
          description: 'TODO: enhance description'
          type: string
        mobile:
          description: 'TODO: enhance description'
          type: string
      type: object
    pb.RestockDTO:
      properties:
        ecommerce_group:
          description: Ecommerce Group. Required
          type: string
        ecommerce_id:
          description: Ecommerce ID. Required.
          type: string
        line_item_id:
          description: Line item ID of the item restocked. Required.
          type: string
        location_id:
          description: location id
          type: string
        process_id:
          description: Process ID. Required.
          type: string
        quantity:
          description: Quantity restocked. Required
          format: int32
          type: integer
      type: object
    pb.RestockLocation:
      description: Restock location
      properties:
        address:
          allOf:
            - $ref: '#/components/schemas/models.Address'
          description: Location address
        is_default:
          description: Is default location
          type: boolean
        location_id:
          description: Location ID
          type: string
        location_name:
          description: Location name
          type: string
      type: object
    pb.ReturnAmount:
      description: ReturnAmount with business rules
      properties:
        business_rules:
          description: |-
            List of business rules that impact in the calculation of 
             the return amount, for example: shipping costs
          items:
            $ref: '#/components/schemas/pb.BusinessRule'
          type: array
      type: object
    pb.ReturnAmountRule:
      description: ReturnAmountRule for the return amount
      properties:
        name:
          description: Name of Business rule
          type: string
        params:
          additionalProperties:
            type: string
          description: Params needed for the business rule
          type: object
        return_original_shipping_costs:
          description: ReturnOriginal_shipping_costs
          type: boolean
        when:
          allOf:
            - $ref: '#/components/schemas/pb.When'
          description: When conditions to evaluate
      type: object
    pb.ReturnConditions:
      description: ReturnConditions is the conditions for the return
      properties:
        return_period_days:
          description: return period days
          format: int32
          type: integer
      type: object
    pb.ReturnLogistics:
      description: |-
        Return logistics configures a way for the users
        to return the products to the e-commerce
      properties:
        carrier:
          description: |-
            carrier that is effectively handling the return
            Example: CorreosExpress, Correos, etc
          type: string
        provider:
          description: >-
            provider is the platform that manages the creation of the return
            label
             Example: Sendcloud, OPS, etc
             Important: the value `OPS` means that the REVER ops team manages 
             the creation of the return label
          type: string
        return_method:
          description: 'type of return method: DROP_OFF, PICKUP...'
          enum:
            - NO_RETURN_METHOD
            - HOME_PICK_UP
            - DROP_OFF_POINT
            - DELIVERY_PICKUP
            - IN_STORE
          format: enum
          type: string
        when:
          description: >-
            list of dynamic evaluations to determine if this logistics is
            available
             They are evaluated in order, and all of them must be true to evaluate 
             together as true (AND condition)
             IF not specified, is considered as true always
             protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED
          items:
            type: string
          type: array
      type: object
    pb.ReturnProcessConditions:
      description: ReturnConditions model
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        keep_your_item:
          allOf:
            - $ref: '#/components/schemas/pb.KeepYourItem'
          description: Keep your item
        max_days_to_send_package:
          description: MaxDaysToSendPackage
          format: int32
          type: integer
        non_returnable_brand_ids:
          description: NonReturnableBrandIds
          items:
            type: string
          type: array
        non_returnable_category_ids:
          description: NonReturnableCategoryIds
          items:
            type: string
          type: array
        non_returnable_collection_ids:
          description: NonReturnableCollectionIds
          items:
            type: string
          type: array
        non_returnable_order_tag_ids:
          description: NonReturnableOrderTagIds
          items:
            type: string
          type: array
        non_returnable_product_ids:
          description: NonReturnableProductIds
          items:
            type: string
          type: array
        non_returnable_tag_ids:
          description: NonReturnableTagIds
          items:
            type: string
          type: array
        pay_for_logistics:
          allOf:
            - $ref: '#/components/schemas/pb.PayForLogistics'
          description: PayForLogistics
        payments_enabled:
          description: PaymentsEnabled
          type: boolean
        require_authorization:
          allOf:
            - $ref: '#/components/schemas/pb.RequireAuthorization'
          description: RequireAuthorization
        return_period_days:
          description: ReturnPeriodDays
          format: int32
          type: integer
        review_flow:
          description: ReviewFlow
          type: string
        skip_fraud_detection:
          description: SkipFraudDetection
          type: boolean
        start_return_on_platform_time:
          description: StartReturnOnPlatformTime
          enum:
            - START_RETURN_ON_PLATFORM_TIME_UNSPECIFIED
            - START_RETURN_ON_PLATFORM_TIME_ON_START
            - START_RETURN_ON_PLATFORM_TIME_ON_ITEM_VERIFICATION
            - START_RETURN_ON_PLATFORM_TIME_NEVER
          format: enum
          type: string
        upload_documents:
          allOf:
            - $ref: '#/components/schemas/pb.UploadDocuments'
          description: UploadDocuments
      type: object
    pb.ReturnProcessFilters:
      properties:
        bank_transfer_refund:
          description: Filter processes by bank transfer refund amount greater than zero
          type: boolean
        created_at_gte:
          description: Filter processes created after or at the given date
          type: string
        created_at_lte:
          description: Filter processes created before or at the given date
          type: string
        ecommerce_id:
          description: Filter processes of the given e-commerce ID
          type: string
        freetext:
          description: Filter processes containing the given text
          type: string
        gift_card_refund:
          description: Filter processes by gift refund amount greater than zero
          type: boolean
        is_exchange:
          description: Filter processes by exchange refund amount greater than zero
          type: boolean
        opm_refund:
          description: Filter processes by OPM refund amount greater than zero
          type: boolean
        promocode_refund:
          description: Filter processes by promocode refund amount greater than zero
          type: boolean
        return_method:
          description: Filter processes by the given return methods
          items:
            type: string
          type: array
        return_status:
          description: Filter processes by the given return statuses
          items:
            type: string
          type: array
      type: object
    pb.ReturnReasonsCollection:
      description: collection of return reasons
      properties:
        return_reasons:
          description: list of return reasons
          items:
            $ref: '#/components/schemas/pb.AvailableReturnReasons'
          type: array
      type: object
    pb.ReturnSummary:
      properties:
        basic_process_data:
          $ref: '#/components/schemas/pb.BasicProcessData'
        compensation:
          $ref: '#/components/schemas/pb.Compensation'
        currency_code:
          type: string
        customer:
          $ref: '#/components/schemas/pb.ReturnSummary_Customer'
        exchange_timing:
          enum:
            - TIMING_UNSPECIFIED
            - TIMING_NO_TIMING
            - TIMING_ON_START
            - TIMING_ON_SENT
            - TIMING_ON_VERIFIED
          format: enum
          type: string
        extra_line_items:
          $ref: '#/components/schemas/pb.ExtraLineItems'
        keep_your_item_type:
          enum:
            - KEEP_YOUR_ITEM_TYPE_UNSPECIFIED
            - KEEP_YOUR_ITEM_TYPE_NONE
            - KEEP_YOUR_ITEM_TYPE_WITHOUT_VALIDATION
          format: enum
          type: string
        open_exchange_items:
          $ref: '#/components/schemas/pb.OpenExchangeItems'
        ordered_items:
          $ref: '#/components/schemas/pb.OrderedItems'
        payments:
          $ref: '#/components/schemas/pb.ReturnSummary_Payments'
        refund_payment_method:
          description: |-
            Payment method chosen by the user when creating the return process. 
             Other payment methods can be added afterwards
          enum:
            - REFUND_PAYMENT_METHOD_UNSPECIFIED
            - REFUND_PAYMENT_METHOD_NO_PAYMENT_METHOD
            - REFUND_PAYMENT_METHOD_BANK_TRANSFER
            - REFUND_PAYMENT_METHOD_ORIGINAL
            - REFUND_PAYMENT_METHOD_PROMO_CODE
            - REFUND_PAYMENT_METHOD_GIFT_CARD
          format: enum
          type: string
        refund_timing:
          description: >-
            Refund timing committed to the user when creating the return
            process. 
             If other payment methods are added afterwards, the timing for them can vary
          enum:
            - TIMING_UNSPECIFIED
            - TIMING_NO_TIMING
            - TIMING_ON_START
            - TIMING_ON_SENT
            - TIMING_ON_VERIFIED
          format: enum
          type: string
        returned_items:
          $ref: '#/components/schemas/pb.ReturnedItems'
        start_return_on_platform_time:
          type: string
        status:
          enum:
            - RETURN_PROCESS_STATUS_UNSPECIFIED
            - RETURN_PROCESS_STATUS_STARTED
            - RETURN_PROCESS_STATUS_COLLECTED
            - RETURN_PROCESS_STATUS_REVIEW_REQUIRED
            - RETURN_PROCESS_STATUS_COMPLETED
            - RETURN_PROCESS_STATUS_CANCELED
            - RETURN_PROCESS_STATUS_AUTHORIZATION_PENDING
            - RETURN_PROCESS_STATUS_DOCUMENT_UPLOAD_PENDING
            - RETURN_PROCESS_STATUS_NOT_AUTHORIZED
          format: enum
          type: string
        upload_documents_info:
          $ref: '#/components/schemas/pb.ReturnSummary_UploadDocumentsInfo'
      type: object
    pb.ReturnSummary_Customer:
      properties:
        address:
          $ref: '#/components/schemas/pb.Customer_Address'
        email:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        preferred_language:
          description: User preferred language
          type: string
      type: object
    pb.ReturnSummary_Payments:
      properties:
        commitment:
          $ref: '#/components/schemas/pb.MoneyBag'
        executed:
          $ref: '#/components/schemas/pb.MoneyBag'
      type: object
    pb.ReturnSummary_UploadDocumentsInfo:
      properties:
        upload_documents_enabled:
          type: boolean
        uploaded_documents:
          items:
            $ref: '#/components/schemas/pb.UploadDocumentsInfo_UploadedDocuments'
          type: array
      type: object
    pb.ReturnedItem:
      properties:
        action:
          enum:
            - ACTION_UNSPECIFIED
            - ACTION_REFUND
            - ACTION_EXCHANGE
          format: enum
          type: string
        platform_line_item_id:
          type: string
        product_info:
          $ref: '#/components/schemas/pb.ReturnedItem_ProductInfo'
        quantity:
          format: int32
          type: integer
        return_reason_key:
          type: string
        rever_id:
          type: string
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
        unit_price:
          allOf:
            - $ref: '#/components/schemas/pb.MoneyBag'
          description: UnitPrice includes taxes and discounts. It is total/quantity
      type: object
    pb.ReturnedItem_ProductInfo:
      properties:
        image_url:
          type: string
        product_id:
          type: string
        product_name:
          type: string
        product_reference:
          type: string
        sku:
          type: string
        variant_ean:
          type: string
        variant_id:
          type: string
        variant_name:
          type: string
        variant_reference:
          type: string
      type: object
    pb.ReturnedItems:
      properties:
        returned_items:
          items:
            $ref: '#/components/schemas/pb.ReturnedItem'
          type: array
        total:
          $ref: '#/components/schemas/pb.MoneyBag'
      type: object
    pb.ReturningItem:
      description: item from order for return
      properties:
        product:
          allOf:
            - $ref: '#/components/schemas/pb.ItemProduct'
          description: The item product
        quantity:
          description: The quantity of the item
          format: int32
          type: integer
        reason:
          description: The reason of the return
          type: string
        total_in_shop_currency:
          description: The total amount of the item in shop currency
          type: string
      type: object
    pb.ReviewLineItem:
      properties:
        created_by_user:
          description: |-
            User that performed the review. Required.
            TODO: should be created_by
            protolint:disable:next FIELD_NAMES_EXCLUDE_PREPOSITIONS
          type: string
        line_item_id:
          description: |-
            REVER ID of the line item of the return process (return items)
            to be reviewed. Required.
          type: string
        reject_reason:
          description: Reason for rejecting the line item. Required if status == DECLINED
          type: string
        show_reject_reason:
          description: Should show reject reason to the user
          type: boolean
        status:
          description: >-
            Review status. Required. the list of values is [APPROVED, DECLINED,
            MISSING]
          type: string
      type: object
    pb.SaveBrandingReq:
      description: Branding save request
      properties:
        background_image_url:
          description: BackgroundImageUrl
          type: string
        background_text_color:
          description: BackgroundTextColor
          type: string
        border_radius:
          description: BorderRadius
          type: string
        ecommerce_id:
          description: EcommerceID
          type: string
        favicon_url:
          description: FaviconUrl
          type: string
        input_variant:
          description: InputVariant
          type: string
        layout_design_values:
          description: LayoutDesignValues
          enum:
            - DEFAULT
            - VERTICAL
            - SIMPLIFIED
          format: enum
          type: string
        logo_height_desktop:
          description: LogoHeightDesktop
          type: string
        logo_height_mobile:
          description: LogoHeightMobile
          type: string
        logo_url:
          description: LogoUrl
          type: string
        mail_logo_url:
          description: MailLogoUrl
          type: string
        mail_main_color:
          description: MailMainColor
          type: string
        primary_theme_color_contrast_text:
          description: PrimaryThemeColorContrastText
          type: string
        primary_theme_color_dark:
          description: PrimaryThemeColorDark
          type: string
        primary_theme_color_light:
          description: PrimaryThemeColorLight
          type: string
        primary_theme_color_main:
          description: PrimaryThemeColorMain
          type: string
        secondary_theme_color_contrast_text:
          description: SecondaryThemeColorContrastText
          type: string
        secondary_theme_color_dark:
          description: SecondaryThemeColorDark
          type: string
        secondary_theme_color_light:
          description: SecondaryThemeColorLight
          type: string
        secondary_theme_color_main:
          description: SecondaryThemeColorMain
          type: string
        slogan:
          description: Slogan
          type: string
        title:
          description: Title
          type: string
      type: object
    pb.SaveBrandingRes:
      description: Branding Save response
      type: object
    pb.SaveEcommerceReq:
      description: Ecommerce save request
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        external_return_policy_url:
          description: external policy url
          type: string
        group:
          description: Group
          type: string
        is_enabled:
          description: IsEnabled
          type: boolean
        is_testing:
          description: IsTesting
          type: boolean
        name:
          description: name
          type: string
        orders_sync_disabled:
          description: OrdersSyncDisabled
          type: boolean
        platform:
          description: Platform
          type: string
        restocking_enabled:
          description: RestockingEnabled
          type: boolean
        slug:
          description: slug
          type: string
        use_case:
          description: UseCase
          type: string
        website_url:
          description: WebsiteURL
          type: string
      type: object
    pb.SaveEcommerceRes:
      description: Ecommerce Save response
      type: object
    pb.SaveExchangeConditionsReq:
      description: ExchangeConditions save request
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        exchange_flow:
          description: exchange flow
          enum:
            - NO_EXCHANGE_FLOW
            - OPEN
            - ONE_ON_ONE
            - OPEN_WITH_GIFT_CARD
            - FULL
          format: enum
          type: string
        platform_main_menu_id:
          description: PlatformMainMenuID
          type: string
        threshold:
          description: Threshold
          format: int32
          type: integer
      type: object
    pb.SaveExchangeConditionsRes:
      description: ExchangeConditions Save response
      type: object
    pb.SaveExchangeOrderWithEcommerceReq:
      description: ExchangeOrder save request
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        payment_method:
          description: PaymentMethod
          type: string
        price:
          description: Price
          type: string
        shipping_line:
          description: ShippingLine
          type: string
      type: object
    pb.SaveExchangeOrderWithEcommerceRes:
      description: ExchangeOrder Save response
      type: object
    pb.SaveLogisticSettingReq:
      description: LogisticSetting save request
      properties:
        delivery_note_type:
          description: DeliveryNoteType
          type: string
        ecommerce_id:
          description: EcommerceID
          type: string
        reminder_flow:
          description: ReminderFlow
          type: string
        return_logistics:
          description: ReturnLogistics
          items:
            $ref: '#/components/schemas/pb.ReturnLogistics'
          type: array
        store_list_url:
          description: StoreListUrl
          type: string
      type: object
    pb.SaveLogisticSettingRes:
      description: LogisticSetting Save response
      type: object
    pb.SaveRDVSurplusReq:
      description: RDVSurplus save request
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        rules:
          description: Rules
          items:
            $ref: '#/components/schemas/pb.RDVSurplusRule'
          type: array
      type: object
    pb.SaveRDVSurplusRes:
      description: RDVSurplus Save response
      type: object
    pb.SaveRefundConfigurationRequest:
      description: SaveRefundConfigurationRequest
      properties:
        action_configs:
          description: ActionConfig
          items:
            $ref: '#/components/schemas/pb.ActionConfig'
          type: array
        ecommerce_id:
          description: ecommerce id
          type: string
        payment_method_configs:
          description: PaymentMethodConfig
          items:
            $ref: '#/components/schemas/pb.PaymentMethodConfig'
          type: array
        round_promocode:
          description: round_promocode
          type: boolean
      type: object
    pb.SaveRefundConfigurationResponse:
      description: SaveRefundConfigurationResponse
      properties:
        ecommerce_id:
          description: ecommerce id
          type: string
      type: object
    pb.SaveRefundGatewaySettingsRequest:
      description: >-
        SaveRefundGatewaySettingsRequest is the request for the
        SaveRefundGatewaySettings method
      properties:
        ecommerce_id:
          description: Ecommerce ID
          type: string
        settings:
          allOf:
            - $ref: '#/components/schemas/pb.RefundGatewaySettings'
          description: Refund gateway settings
      type: object
    pb.SaveRefundGatewaySettingsResponse:
      description: >-
        SaveRefundGatewaySettingsResponse is the response for the
        SaveRefundGatewaySettings method
      properties:
        ecommerce_id:
          description: Ecommerce ID
          type: string
      type: object
    pb.SaveReturnProcessConditionsReq:
      description: ReturnConditions save request
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        keep_your_item:
          allOf:
            - $ref: '#/components/schemas/pb.KeepYourItem'
          description: Keep your item
        max_days_to_send_package:
          description: MaxDaysToSendPackage
          format: int32
          type: integer
        non_returnable_brand_ids:
          description: NonReturnableBrandIds
          items:
            type: string
          type: array
        non_returnable_category_ids:
          description: NonReturnableCategoryIds
          items:
            type: string
          type: array
        non_returnable_collection_ids:
          description: NonReturnableCollectionIds
          items:
            type: string
          type: array
        non_returnable_order_tag_ids:
          description: NonReturnableOrderTagIds
          items:
            type: string
          type: array
        non_returnable_product_ids:
          description: NonReturnableProductIds
          items:
            type: string
          type: array
        non_returnable_tag_ids:
          description: NonReturnableTagIds
          items:
            type: string
          type: array
        pay_for_logistics:
          allOf:
            - $ref: '#/components/schemas/pb.PayForLogistics'
          description: PayForLogistics
        payments_enabled:
          description: PaymentsEnabled
          type: boolean
        require_authorization:
          allOf:
            - $ref: '#/components/schemas/pb.RequireAuthorization'
          description: RequireAuthorization
        return_period_days:
          description: ReturnPeriodDays
          format: int32
          type: integer
        review_flow:
          description: ReviewFlow
          type: string
        skip_fraud_detection:
          description: SkipFraudDetection
          type: boolean
        start_return_on_platform_time:
          description: StartReturnOnPlatformTime
          enum:
            - START_RETURN_ON_PLATFORM_TIME_UNSPECIFIED
            - START_RETURN_ON_PLATFORM_TIME_ON_START
            - START_RETURN_ON_PLATFORM_TIME_ON_ITEM_VERIFICATION
            - START_RETURN_ON_PLATFORM_TIME_NEVER
          format: enum
          type: string
        upload_documents:
          allOf:
            - $ref: '#/components/schemas/pb.UploadDocuments'
          description: UploadDocuments
      type: object
    pb.SaveReturnProcessConditionsRes:
      description: ReturnConditions Save response
      type: object
    pb.SaveReturnReasonsReq:
      description: save all return reasons request
      properties:
        ecommerce_id:
          description: ecommerce id
          type: string
        return_reasons:
          description: return reasons to save
          items:
            $ref: '#/components/schemas/pb.NewReturnReason'
          type: array
      type: object
    pb.SaveReturnReasonsRes:
      description: result of saving return reasons
      type: object
    pb.SaveSalesforceSettingsRequest:
      description: SaveSalesforceSettingsRequest request
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
      type: object
    pb.SaveSalesforceSettingsResponse:
      description: SaveSalesforceSettingsResponse response
      type: object
    pb.SaveServiceFeesReq:
      description: Save service fees request
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        rules:
          description: Rules
          items:
            $ref: '#/components/schemas/pb.ServiceFeesRule'
          type: array
      type: object
    pb.SaveServiceFeesRes:
      description: Save service fees response
      type: object
    pb.SaveWarehouseConfigRequest:
      description: SaveWarehouseConfigRequest
      properties:
        ecommerce_id:
          description: EcommerceID
          type: string
        warehouse_configs:
          description: List of warehouse configs
          items:
            $ref: '#/components/schemas/pb.WarehouseConfig'
          type: array
      type: object
    pb.SaveWarehouseConfigResponse:
      description: SaveWarehouseConfigResponse
      properties:
        ecommerce_id:
          description: Ecommerce ID
          type: string
      type: object
    pb.SaveWarehousesReq:
      description: Ecomerce's save warehouses request
      properties:
        warehouses:
          description: Warehouses
          items:
            $ref: '#/components/schemas/pb.Warehouse'
          type: array
      type: object
    pb.SaveWarehousesRes:
      description: Ecomerce's save warehouses response
      type: object
    pb.SendSignalToWorkflowRequest:
      properties:
        signal:
          type: string
        workflow_id:
          type: string
      type: object
    pb.SendSignalToWorkflowResponse:
      type: object
    pb.ServiceFeesRule:
      description: Business rule for service fees
      properties:
        apply_only_if_payment_at_checkout:
          description: apply_only_if_payment_at_checkout
          type: boolean
        service_fee_amount:
          description: Service fee amount
          type: string
        service_fee_percentage:
          description: Service fee percentage
          format: float
          type: number
        whens:
          description: When conditions to evaluate
          items:
            type: string
          type: array
      type: object
    pb.ShippingCost:
      description: ShippingCost keeps the data for the shipping cost of an order
      properties:
        total:
          description: Total amount of shipping cost in customer currency
          type: string
      type: object
    pb.ShopifySettings:
      description: Specific settings for an e-commerce using the Shopify platform
      properties:
        api_token:
          description: API token generated when installing the REVER app in Shopify
          type: string
        is_returns_api_enabled:
          description: Is Returns API enabled
          type: boolean
        mark_items_as_refunded:
          description: Mark items as refunded in Shopify
          type: boolean
        store_id:
          description: ID of the store in shopify
          type: string
        storefront_token:
          description: Token generated at onboarding time, used to create exchange orders
          type: string
      type: object
    pb.StripeCustomerPortalURL:
      description: Stripe customer portal session information
      properties:
        stripe_url:
          description: The url to redirect the user to the stripe customer portal
          type: string
      type: object
    pb.Tag:
      properties:
        name:
          description: tag name
          type: string
      type: object
    pb.TagCopyDetails:
      description: Array of multiple copies
      properties:
        copies:
          description: The copy details.
          items:
            $ref: '#/components/schemas/pb.CopyDetail'
          type: array
        is_ecommerce_editable:
          description: Is FieldTag editable by ecommerce.
          type: boolean
      type: object
    pb.ThemeColor:
      description: Color of a theme
      properties:
        contrast_text:
          description: HTML coded color
          type: string
        dark:
          description: HTML coded color
          type: string
        light:
          description: HTML coded color
          type: string
        main:
          description: HTML coded color
          type: string
      type: object
    pb.Theming:
      description: defines the theme of an e-commerce
      properties:
        background_image_url:
          description: URL of the background image
          type: string
        background_text_color:
          description: 'TODO: enhance description'
          type: string
        border_radius:
          description: 'TODO: enhance description'
          type: string
        design:
          description: Layout to be used in the returns portal (VERTICAL, SIMPLIFIED...)
          enum:
            - DEFAULT
            - VERTICAL
            - SIMPLIFIED
          format: enum
          type: string
        favicon_url:
          description: URL of the favicon
          type: string
        input_variant:
          description: 'TODO: enhance description'
          type: string
        logo_height:
          allOf:
            - $ref: '#/components/schemas/pb.ResponsiveStyle'
          description: |-
            TODO: enhance description 
             responsive strategy of the logo in the returns portal
        logo_url:
          description: URL of the logo
          type: string
        primary:
          allOf:
            - $ref: '#/components/schemas/pb.ThemeColor'
          description: Primary color of the theme for the returns portal
        secondary:
          allOf:
            - $ref: '#/components/schemas/pb.ThemeColor'
          description: Secoundary color of the theme for the returns portal
        slogan:
          description: >-
            Optional slogan (secoundary) of the returns portal page for this
            e-commerce
          type: string
        title:
          description: Title of the returns portal page for this e-commerce
          type: string
      type: object
    pb.TiktokPlatformSettings:
      description: Tiktok platform settings
      properties:
        refresh_token:
          description: Refresh token
          type: string
        shop_country:
          description: Shop country
          type: string
        shop_id:
          description: Shop ID
          type: string
      type: object
    pb.TransactionInput:
      description: Inputs for a transaction to be added
      properties:
        amount:
          description: Amount following MoneyFormat
          type: string
        currency:
          description: Currency
          type: string
        metadata:
          additionalProperties:
            type: string
          description: Metadata
          type: object
        note:
          description: Description/notes associated
          type: string
        platform_id:
          description: Identifier of the transaction in the provider
          type: string
        platform_url:
          description: URL associated to this transaction in the external system
          type: string
        provider:
          description: Provider of the transaction (where we execute the transaction)
          enum:
            - TXPROVIDER_MOCK
            - TXPROVIDER_WOOCOMMERCE
            - TXPROVIDER_SHOPIFY
            - TXPROVIDER_CUSTOM_GENERIC
            - TXPROVIDER_PRESTASHOP
            - TXPROVIDER_MAGENTO_V1
            - TXPROVIDER_MAGENTO_V2
            - TXPROVIDER_SALESFORCE
            - TXPROVIDER_REVOLUT
            - TXPROVIDER_STRIPE
            - TXPROVIDER_SENDCLOUD
            - TXPROVIDER_CORREOS
            - TXPROVIDER_CORREOS_EXPRESS
            - TXPROVIDER_SHIPPY_PRO
            - TXPROVIDER_UPS
            - TXPROVIDER_GLS
            - TXPROVIDER_DHL
            - TXPROVIDER_DHL_EXPRESS
            - TXPROVIDER_DHL_PARCEL
            - TXPROVIDER_RHENUS
            - TXPROVIDER_FEDEX
            - TXPROVIDER_ZELERIS
            - TXPROVIDER_SENDCLOUD_ECOMMERCE
            - TXPROVIDER_ENOVO
            - TXPROVIDER_ZELO
            - TXPROVIDER_COLISSIMO
            - TXPROVIDER_CTT
            - TXPROVIDER_NONE
          format: enum
          type: string
        refund_payment_method:
          description: Payment method associated (only when action == TO_REFUND)
          enum:
            - NO_PAYMENT_METHOD
            - BANK_TRANSFER
            - ORIGINAL
            - PROMO_CODE
            - GIFT_CARD
            - MANUAL
          format: enum
          type: string
        status:
          description: Status of the transaction. Only consider COMPLETED as succesful
          enum:
            - NO_TRANSACTION_STATUS
            - TX_COMPLETED
            - TX_DENIED
            - TX_IN_PROGRESS
            - TX_ERROR
            - TX_CANCELED
          format: enum
          type: string
        type:
          description: Type of transaction (exchange operation, refund operation....)
          enum:
            - TXTYPE_UNKNOWN
            - TXTYPE_REFUND
            - TXTYPE_EXCHANGE
            - TXTYPE_LOGISTICS
            - TXTYPE_RETURN
            - TXTYPE_PICKUP
            - TXTYPE_COMMIT
            - TXTYPE_LOST
            - TXTYPE_PAYMENT
            - TXTYPE_COMMIT_PAYMENT
            - TXTYPE_COMMIT_EXCHANGE
          format: enum
          type: string
      type: object
    pb.TriggerRefundsForProcessResponse:
      type: object
    pb.UpdateECommerceCopiesResponse:
      description: Empty Response for updating ecommerece copies
      type: object
    pb.UpdateEcommerceCopyRequest:
      description: Request to get the copies for a given e-commerce
      properties:
        copy_details:
          additionalProperties:
            $ref: '#/components/schemas/pb.TagCopyDetails'
          description: Map of array of Copies to be updated
          type: object
        ecommerce_id:
          description: The id of the e-commerce.
          type: string
      type: object
    pb.UpdateLogisticsRequest:
      description: Payload for updating the logistics fields of a given return process
      properties:
        process_id:
          description: The process ID to update. Required.
          type: string
        user:
          description: The user that performed the update. Required.
          type: string
        user_selected_carrier:
          description: |-
            The new logistics carrier of the process. 
             It's used by the process to request the creation to the provider 
             of the shipping order using his carrier
             If it's already created, has no effect.
             Required.
          type: string
        user_selected_provider:
          description: |-
            The new logistics provider of the process. 
             It's used by the process to request the creation of the shipping
             order to this provider. If it's already created, has no effect.
             Required.
          type: string
      type: object
    pb.UpdateLogisticsResponse:
      type: object
    pb.UpdatePrestashopModuleResponse:
      description: >-
        UpdatePrestashopModuleResponse represents the response for updating
        Prestashop modules
      properties:
        updated_ecommerces:
          description: List of updated ecommerces
          items:
            $ref: '#/components/schemas/pb.UpdatedEcommerce'
          type: array
      type: object
    pb.UpdateProductAutomationsSettingsRequest:
      description: >-
        UpdateProductAutomationsSettingsRequest contains the request to update
        the PA settings for an ecommerce
      properties:
        ecommerce_id:
          description: The ecommerce id
          type: string
        group:
          description: The ecommerce group
          type: string
        updated_section:
          allOf:
            - $ref: '#/components/schemas/pb.PASection'
          description: The settings section to update
      type: object
    pb.UpdateProductAutomationsSettingsResponse:
      description: >-
        UpdateProductAutomationsSettingsResponse contains the response to update
        the PA settings for an ecommerce
      type: object
    pb.UpdateWorkflowStatusRequest:
      description: >-
        Payload for updating the status of the main workflow a given return
        process

        The status of the process can be RUNNING, COMPLETED, ON_HOLD...
      properties:
        process_id:
          description: The process ID to update. Required.
          type: string
        status:
          description: The new status of the process. Required.
          enum:
            - RUNNING
            - FAILED
            - COMPLETED
            - ON_HOLD
            - RETURN_STATUS_CANCELED
          format: enum
          type: string
      type: object
    pb.UpdateWorkflowStatusResponse:
      type: object
    pb.UpdatedEcommerce:
      description: UpdatedEcommerce contains information about an updated ecommerce
      properties:
        ecommerce_id:
          description: ID of the updated ecommerce
          type: string
        error:
          description: Error
          type: string
        version:
          description: Version of the updated module
          type: string
      type: object
    pb.UploadDocuments:
      description: UploadDocuments request
      properties:
        always:
          description: always
          type: boolean
        options:
          description: options
          items:
            $ref: '#/components/schemas/pb.UploadDocumentsOption'
          type: array
      type: object
    pb.UploadDocumentsInfo_UploadedDocuments:
      properties:
        document_info:
          type: string
        document_url:
          type: string
      type: object
    pb.UploadDocumentsOption:
      description: request to know if we should UploadDocuments
      properties:
        whens:
          description: when
          items:
            type: string
          type: array
      type: object
    pb.UploadReturnDocumentsRequest:
      properties:
        documents:
          items:
            $ref: '#/components/schemas/pb.UploadReturnDocumentsRequest_Document'
          type: array
        process_id:
          type: string
      type: object
    pb.UploadReturnDocumentsRequest_Document:
      properties:
        data:
          format: bytes
          type: string
        document_information:
          type: string
      type: object
    pb.UploadReturnDocumentsResponse:
      type: object
    pb.User:
      description: User
      properties:
        e_commerces_ids:
          description: ECommerces
          items:
            type: string
          type: array
        group:
          description: Group
          type: string
        name:
          description: Name
          type: string
        role:
          description: Role
          type: string
      type: object
    pb.ValidateReviewRequest:
      properties:
        process_id:
          description: process ID to validate
          type: string
        refund_override:
          allOf:
            - $ref: '#/components/schemas/pb.RefundOverride'
          description: Refund override
        reviews:
          description: Review data
          items:
            $ref: '#/components/schemas/pb.ReviewLineItem'
          type: array
      type: object
    pb.ValidateReviewResponse:
      properties:
        error_message:
          description: error message
          type: string
        is_valid:
          description: is Review Request valid
          type: boolean
      type: object
    pb.VariantRestockLocations:
      description: Restock locations for the requested items
      properties:
        restock_locations:
          description: Restock locations
          items:
            $ref: '#/components/schemas/pb.RestockLocation'
          type: array
        variant_id:
          description: Variant ID
          type: string
      type: object
    pb.VtexPlatformSettings:
      description: Vtex platform settings
      properties:
        app_key:
          description: App key
          type: string
        app_token:
          description: App token
          type: string
      type: object
    pb.Warehouse:
      description: Warehouse model
      properties:
        address_line1:
          description: AddressLine1
          type: string
        address_line2:
          description: AddressLine2
          type: string
        city:
          description: City
          type: string
        company:
          description: Company
          type: string
        country:
          description: Country
          type: string
        country_code:
          description: CountryCode
          type: string
        ecommerce_id:
          description: EcommerceID
          type: string
        email:
          description: Email
          type: string
        first_name:
          description: FirstName
          type: string
        id:
          description: ID
          type: string
        last_name:
          description: LastName
          type: string
        phone:
          description: Phone
          type: string
        postcode:
          description: Postcode
          type: string
        state_province:
          description: StateProvince
          type: string
        state_province_code:
          description: StateProvinceCode
          type: string
      type: object
    pb.WarehouseAddress:
      description: WarehouseAddress is the address where the items will be returned
      properties:
        address_line_1:
          description: address line 1
          type: string
        address_line_2:
          description: address line 2
          type: string
        city:
          description: city
          type: string
        company:
          description: company
          type: string
        country:
          description: country
          type: string
        country_code:
          description: country code
          type: string
        email:
          description: email
          type: string
        name:
          description: name
          type: string
        phone:
          description: phone
          type: string
        postal_code:
          description: postal code
          type: string
        province:
          description: province
          type: string
      type: object
    pb.WarehouseConfig:
      description: WarehouseConfig
      properties:
        options:
          description: WarehouseConfigOptions
          items:
            $ref: '#/components/schemas/pb.WarehouseConfigOptions'
          type: array
      type: object
    pb.WarehouseConfigOptions:
      description: WarehouseConfigOptions
      properties:
        warehouse_id:
          description: WarehouseID
          type: string
        whens:
          description: Whens
          items:
            type: string
          type: array
      type: object
    pb.Warehouses:
      description: Warehouses
      properties:
        warehouses:
          description: List of warehouses
          items:
            $ref: '#/components/schemas/pb.Warehouse'
          type: array
      type: object
    pb.WebsiteSettings:
      description: misc information about the e-commerce
      properties:
        url:
          description: url of th e-commerce (used to redirect after return creation)
          type: string
      type: object
    pb.When:
      description: When conditions to evaluate
      properties:
        conditions:
          description: Every entry is evaluated as an AND condition
          items:
            $ref: '#/components/schemas/pb.Condition'
          type: array
      type: object
    pb.WooCommerceSettings:
      description: Specific settings for an e-commerce using the WooCommerce platform
      properties:
        api_base_url:
          description: The url of the wordpress site
          type: string
        api_key:
          description: API key
          type: string
        api_secret:
          description: API secret
          type: string
        major_version:
          description: Version of WooCommerce -- compatibility and breaking changes
          type: string
        use_query_string_auth:
          description: |-
            whether authentication with WooCommerce is done with query string
            or via header. Default: false (header)
          type: boolean
      type: object
    pb.Workflow:
      properties:
        rever_status:
          type: string
        workflow_id:
          type: string
        workflow_type:
          type: string
      type: object
    pbshopping.CatalogProducts:
      description: Catalog products
      properties:
        page_info:
          allOf:
            - $ref: '#/components/schemas/pbshopping.PageInfo'
          description: The page info
        products:
          description: Collection of products with basic details
          items:
            $ref: '#/components/schemas/pbshopping.ProductInfo'
          type: array
      type: object
    pbshopping.Menu:
      description: Menu is the menu of the store
      properties:
        id:
          description: The id of the menu
          type: string
        items:
          description: The items of the menu
          items:
            $ref: '#/components/schemas/pbshopping.MenuItem'
          type: array
      type: object
    pbshopping.MenuItem:
      description: MenuItem is the item of the menu
      properties:
        platform_id:
          description: The id of the menu item
          type: string
        resource_id:
          description: The name of the menu item
          type: string
        resource_type:
          description: The type of the resource
          enum:
            - RESOURCE_TYPE_UNSPECIFIED
            - COLLECTION
            - CATALOG
            - SEARCH
          format: enum
          type: string
        title:
          description: The title of the menu item
          type: string
      type: object
    pbshopping.Options:
      description: Options is the options of the product
      properties:
        name:
          description: The name of the option
          type: string
        value:
          description: The value of the option
          type: string
      type: object
    pbshopping.PageInfo:
      properties:
        end_cursor:
          description: |-
            end_cursor, for request it would be empty 
             for response, it would be the next page start_cursor
          type: string
        has_next_page:
          description: Has next page, for request it would be empty
          type: boolean
        page_size:
          description: page size, for response it would be empty
          format: int32
          type: integer
        start_cursor:
          description: start_cursor, for first request , it would be empty
          type: string
      type: object
    pbshopping.Price:
      description: Price is the price of the product
      properties:
        amount:
          description: The amount of the price
          type: string
        currency:
          description: The currency of the price
          type: string
      type: object
    pbshopping.PriceRange:
      description: PriceRange is the price range of the product
      properties:
        max:
          allOf:
            - $ref: '#/components/schemas/pbshopping.Price'
          description: The max price of the product
        min:
          allOf:
            - $ref: '#/components/schemas/pbshopping.Price'
          description: The min price of the product
      type: object
    pbshopping.ProductInfo:
      description: Products Basic Info
      properties:
        collection_ids:
          description: Collection IDs
          items:
            type: string
          type: array
        description:
          description: The Description of the product
          type: string
        featured_image_url:
          description: The featured image of the product
          type: string
        id:
          description: The id of the product
          type: string
        image_urls:
          description: Images URLs
          items:
            type: string
          type: array
        options:
          description: The options of the product
          items:
            $ref: '#/components/schemas/pbshopping.ProductOptions'
          type: array
        price_range:
          allOf:
            - $ref: '#/components/schemas/pbshopping.PriceRange'
          description: The price range of the product
        title:
          description: The title of the product
          type: string
      type: object
    pbshopping.ProductOptions:
      description: ProductOptions is the options of the product
      properties:
        name:
          description: The name of the option
          type: string
        platform_id:
          description: The id of the option
          type: string
        values:
          description: The values of the option
          items:
            type: string
          type: array
      type: object
    pbshopping.StoreFrontProductDetails:
      properties:
        image_urls:
          description: images of the product
          items:
            type: string
          type: array
        product_info:
          allOf:
            - $ref: '#/components/schemas/pbshopping.ProductInfo'
          description: Product details
        variants:
          description: Variant Details
          items:
            $ref: '#/components/schemas/pbshopping.StoreFrontVariant'
          type: array
      type: object
    pbshopping.StoreFrontVariant:
      properties:
        enabled:
          description: The enabled status of the variant
          type: boolean
        image_urls:
          description: images urls
          items:
            type: string
          type: array
        inventory_quantity:
          description: The inventory of the variant
          format: int32
          type: integer
        is_inventory_enabled:
          description: is inventory enabled
          type: boolean
        platform_id:
          description: The id of the variant
          type: string
        price:
          allOf:
            - $ref: '#/components/schemas/pbshopping.Price'
          description: The price of the variant
        selected_options:
          description: The options of the variant
          items:
            $ref: '#/components/schemas/pbshopping.Options'
          type: array
        sku:
          description: The sku of the variant
          type: string
        title:
          description: The title of the variant
          type: string
      type: object
    returns.CalculatedSummary:
      properties:
        costs:
          items:
            $ref: '#/components/schemas/returns.CalculatedSummary_Cost'
          type: array
        exchange_items:
          items:
            $ref: '#/components/schemas/returns.CalculatedSummary_ExchangeItem'
          type: array
        is_negative:
          type: boolean
        returned_items:
          items:
            $ref: '#/components/schemas/returns.CalculatedSummary_ReturnedItem'
          type: array
        subtotal_formatted:
          type: string
        total_formatted:
          type: string
      type: object
    returns.CalculatedSummary_Cost:
      properties:
        name:
          type: string
        price_formatted:
          type: string
        subtype:
          type: string
        total:
          format: int32
          type: integer
      type: object
    returns.CalculatedSummary_ExchangeItem:
      properties:
        id:
          type: string
        name:
          type: string
        quantity:
          format: int32
          type: integer
        total:
          format: int32
          type: integer
        total_formatted:
          type: string
        variant_name:
          type: string
      type: object
    returns.CalculatedSummary_ReturnedItem:
      properties:
        id:
          type: string
        image_url:
          type: string
        name:
          type: string
        price_formatted:
          type: string
        quantity:
          format: int32
          type: integer
        return_reason:
          type: string
        total:
          format: int32
          type: integer
        variant_name:
          type: string
      type: object
    returns.Category:
      properties:
        id:
          type: string
      type: object
    returns.CreateLiteOrderRequest:
      properties:
        customer_printed_order_id:
          type: string
        ecommerce_id:
          type: string
        email:
          type: string
        products_to_return:
          items:
            $ref: >-
              #/components/schemas/returns.CreateLiteOrderRequest_ProductToReturn
          type: array
      type: object
    returns.CreateLiteOrderRequest_ProductToReturn:
      properties:
        product_name:
          type: string
        quantity:
          format: int32
          type: integer
        reason:
          type: string
      type: object
    returns.CreateLiteOrderResponse:
      properties:
        checkout_id:
          type: string
        order:
          $ref: '#/components/schemas/returns.Order'
      type: object
    returns.Customer:
      properties:
        email:
          type: string
        first_name:
          type: string
        last_name:
          type: string
      type: object
    returns.DeliveryNotePresignedURLRequest:
      properties:
        return_process_identification:
          $ref: '#/components/schemas/returns.ReturnProcessIdentification'
      type: object
    returns.DeliveryNotePresignedURLResponse:
      properties:
        url:
          type: string
      type: object
    returns.ExchangeOptions:
      properties:
        ecommerce_id:
          type: string
        exchange_flow:
          enum:
            - EXCHANGE_FLOW_UNSPECIFIED
            - EXCHANGE_FLOW_NONE
            - EXCHANGE_FLOW_OPEN
            - EXCHANGE_FLOW_ONE_ON_ONE
            - EXCHANGE_FLOW_OPEN_WITH_GIFT_CARD
            - EXCHANGE_FLOW_FULL
          format: enum
          type: string
        force_exchange:
          type: boolean
        line_item_platform_id:
          type: string
      type: object
    returns.ExchangeOptionsRequest:
      properties:
        checkout_id:
          type: string
        ecommerce_id:
          type: string
        line_item_platform_id:
          type: string
        quantity:
          format: int32
          type: integer
        return_reason:
          type: string
      type: object
    returns.ExchangeOptionsResponse:
      properties:
        exchange_options:
          allOf:
            - $ref: '#/components/schemas/returns.ExchangeOptions'
          description: Exchange options to be offered
        line_item_product_info:
          allOf:
            - $ref: >-
                #/components/schemas/returns.ExchangeOptionsResponse_OneOnOneProductInfo
          description: Info about line item's product (for one-on-one exchanges)
        signed_line_item_product_raw:
          description: Line item's product (signed, raw)
          type: string
      type: object
    returns.ExchangeOptionsResponse_OneOnOneProductInfo:
      properties:
        name:
          description: Product name
          type: string
        platform_id:
          description: Product ID in e-commerce platform
          type: string
        variants:
          description: Product variants
          items:
            $ref: >-
              #/components/schemas/returns.ExchangeOptionsResponse_OneOnOneVariantInfo
          type: array
      type: object
    returns.ExchangeOptionsResponse_OneOnOneVariantInfo:
      properties:
        applied_price:
          allOf:
            - $ref: '#/components/schemas/returns.Money'
          description: Variant price to be applied (after exchange promotions, if any)
        inventory_quantity:
          description: Inventory quantity available (only relevant if inventory is enabled)
          format: int32
          type: integer
        is_available:
          description: Variant availability
          type: boolean
        is_inventory_enabled:
          description: Status of inventory tracking for this variant
          type: boolean
        name:
          description: Variant name
          type: string
        platform_id:
          description: Variant ID in e-commerce platform
          type: string
        unavailability_reason:
          description: Variant unavailability reason
          enum:
            - UNAVAILABILITY_REASON_UNSPECIFIED
            - UNAVAILABILITY_REASON_NOT_APPLICABLE
            - UNAVAILABILITY_REASON_PRICE_TOO_HIGH
          format: enum
          type: string
      type: object
    returns.ExchangeOrderInfo_ExchangeItem:
      properties:
        product_name:
          type: string
        quantity:
          format: int32
          type: integer
        variant_name:
          type: string
      type: object
    returns.GetOrderResponse:
      properties:
        checkout_id:
          type: string
        order:
          $ref: '#/components/schemas/returns.Order'
        previous_return_processes:
          items:
            $ref: '#/components/schemas/returns.PreviousReturnProcess'
          type: array
      type: object
    returns.Identification:
      properties:
        customer_printed_order_id:
          type: string
        ecommerce_id:
          type: string
        id:
          type: string
      type: object
    returns.Image:
      properties:
        alt:
          type: string
        name:
          type: string
        src:
          type: string
      type: object
    returns.InstructionsPresignedURLRequest:
      properties:
        return_process_identification:
          $ref: '#/components/schemas/returns.ReturnProcessIdentification'
      type: object
    returns.InstructionsPresignedURLResponse:
      properties:
        url:
          type: string
      type: object
    returns.LabelPresignedURLRequest:
      properties:
        return_process_identification:
          $ref: '#/components/schemas/returns.ReturnProcessIdentification'
      type: object
    returns.LabelPresignedURLResponse:
      properties:
        url:
          type: string
      type: object
    returns.LineItem:
      properties:
        id:
          type: string
        name:
          type: string
        non_returnable_items:
          items:
            $ref: '#/components/schemas/returns.NonReturnableItem'
          type: array
        product:
          $ref: '#/components/schemas/returns.OrderProduct'
        quantity:
          format: int32
          type: integer
        total:
          format: int32
          type: integer
        variant_name:
          type: string
      type: object
    returns.LogisticsInfo_DropoffInfo:
      properties:
        points_url:
          type: string
      type: object
    returns.LogisticsInfo_InStoreInfo:
      properties:
        barcode_url:
          type: string
        store_list_url:
          type: string
      type: object
    returns.LogisticsInfo_PickupInfo:
      properties:
        schedule_url:
          type: string
      type: object
    returns.Money:
      properties:
        amount:
          type: string
        currency_code:
          type: string
      type: object
    returns.NonReturnableItem:
      properties:
        quantity:
          format: int32
          type: integer
        reason:
          enum:
            - NON_RETURNABLE_REASON_NONE
            - NON_RETURNABLE_REASON_IN_PROGRESS
            - NON_RETURNABLE_REASON_RETURNED
            - NON_RETURNABLE_REASON_NON_RETURNABLE
            - NON_RETURNABLE_REASON_NOT_FULFILLED
            - NON_RETURNABLE_REASON_OUT_OF_RETURN_PERIOD
            - NON_RETURNABLE_REASON_PARENT_NOT_COMPLETED
          format: enum
          type: string
      type: object
    returns.Order:
      properties:
        customer:
          $ref: '#/components/schemas/returns.Customer'
        identification:
          $ref: '#/components/schemas/returns.Identification'
        line_items:
          items:
            $ref: '#/components/schemas/returns.LineItem'
          type: array
        money_format:
          $ref: '#/components/schemas/models.MoneyFormat'
        purchased_at:
          format: date-time
          type: string
        shipping_address:
          $ref: '#/components/schemas/models.Address'
      type: object
    returns.OrderProduct:
      properties:
        categories:
          items:
            $ref: '#/components/schemas/returns.Category'
          type: array
        images:
          items:
            $ref: '#/components/schemas/returns.Image'
          type: array
      type: object
    returns.PreviousReturnProcess:
      properties:
        process_id:
          type: string
        started_at:
          format: date-time
          type: string
      type: object
    returns.ProductDetailsResponse:
      properties:
        product_info:
          $ref: '#/components/schemas/returns.ProductDetailsResponse_ProductInfo'
        signed_product_raw:
          type: string
      type: object
    returns.ProductDetailsResponse_ProductInfo:
      properties:
        collection_ids:
          description: Collection IDs
          items:
            type: string
          type: array
        featured_image_url:
          description: Featured image URL
          type: string
        image_urls:
          description: Other image URLs
          items:
            type: string
          type: array
        name:
          description: Product name
          type: string
        platform_id:
          description: Product ID in e-commerce platform
          type: string
        variants:
          description: Product variants
          items:
            $ref: '#/components/schemas/returns.ProductDetailsResponse_VariantInfo'
          type: array
      type: object
    returns.ProductDetailsResponse_VariantInfo:
      properties:
        image_urls:
          description: Image URLs
          items:
            type: string
          type: array
        inventory_quantity:
          description: Inventory quantity available (only relevant if inventory is enabled)
          format: int32
          type: integer
        is_inventory_enabled:
          description: Status of inventory tracking for this variant
          type: boolean
        name:
          description: Variant name
          type: string
        platform_id:
          description: Variant ID in e-commerce platform
          type: string
        price:
          allOf:
            - $ref: '#/components/schemas/returns.Money'
          description: Variant price
      type: object
    returns.ReturnProcessIdentification:
      properties:
        email:
          description: Email address of the customer related to the return process
          type: string
        process_id:
          description: Return process ID
          type: string
      type: object
    returns.StripeWebhookResponse:
      type: object
    returns.TrackingInfoRequest:
      properties:
        return_process_identification:
          $ref: '#/components/schemas/returns.ReturnProcessIdentification'
      type: object
    returns.TrackingInfoResponse:
      properties:
        customer_printed_order_id:
          type: string
        exchange_order_info:
          $ref: '#/components/schemas/returns.TrackingInfoResponse_ExchangeOrderInfo'
        keep_your_item_type:
          enum:
            - KEEP_YOUR_ITEM_TYPE_UNSPECIFIED
            - KEEP_YOUR_ITEM_TYPE_NONE
            - KEEP_YOUR_ITEM_TYPE_WITHOUT_VALIDATION
          format: enum
          type: string
        logistics_info:
          $ref: '#/components/schemas/returns.TrackingInfoResponse_LogisticsInfo'
        refund_info:
          $ref: '#/components/schemas/returns.TrackingInfoResponse_RefundInfo'
        review_result:
          enum:
            - REVIEW_RESULT_UNSPECIFIED
            - NOT_REVIEWED
            - FULLY_APPROVED
            - PARTIALLY_APPROVED
            - FULLY_DECLINED
          format: enum
          type: string
        status:
          enum:
            - RETURN_STATUS_UNSPECIFIED
            - STARTED
            - IN_TRANSIT
            - IN_WAREHOUSE
            - REVIEWED
            - AUTHORIZATION_PENDING
            - DOCUMENT_UPLOAD_PENDING
            - CANCELED
            - NOT_AUTHORIZED
          format: enum
          type: string
        summary:
          $ref: '#/components/schemas/returns.CalculatedSummary'
        upload_documents_info:
          $ref: >-
            #/components/schemas/returns.TrackingInfoResponse_UploadDocumentsInfo
      type: object
    returns.TrackingInfoResponse_ExchangeOrderInfo:
      properties:
        exchange_items:
          items:
            $ref: '#/components/schemas/returns.ExchangeOrderInfo_ExchangeItem'
          type: array
        order_number:
          type: string
      type: object
    returns.TrackingInfoResponse_LogisticsInfo:
      properties:
        carrier:
          type: string
        delivery_note_status:
          enum:
            - DOCUMENT_STATUS_UNSPECIFIED
            - AVAILABLE
            - PENDING
            - NOT_REQUIRED
          format: enum
          type: string
        dropoff_info:
          $ref: '#/components/schemas/returns.LogisticsInfo_DropoffInfo'
        in_store_info:
          $ref: '#/components/schemas/returns.LogisticsInfo_InStoreInfo'
        instructions_status:
          enum:
            - DOCUMENT_STATUS_UNSPECIFIED
            - AVAILABLE
            - PENDING
            - NOT_REQUIRED
          format: enum
          type: string
        label_status:
          enum:
            - DOCUMENT_STATUS_UNSPECIFIED
            - AVAILABLE
            - PENDING
            - NOT_REQUIRED
          format: enum
          type: string
        pickup_info:
          $ref: '#/components/schemas/returns.LogisticsInfo_PickupInfo'
        return_method:
          enum:
            - RETURN_METHOD_UNSPECIFIED
            - HOME_PICK_UP
            - DROP_OFF_POINT
            - DELIVERY_PICKUP
            - IN_STORE
            - NO_RETURN_METHOD
          format: enum
          type: string
      type: object
    returns.TrackingInfoResponse_RefundInfo:
      properties:
        bank_account_last_digits:
          type: string
        executed_formatted_amount:
          type: string
        gift_card_code:
          type: string
        payment_method:
          enum:
            - REFUND_PAYMENT_METHOD_UNSPECIFIED
            - BANK_TRANSFER
            - ORIGINAL
            - PROMO_CODE
            - GIFT_CARD
            - REFUND_PAYMENT_METHOD_NOT_NECESSARY
          format: enum
          type: string
        pending_formatted_amount:
          type: string
        refunded_at:
          format: date-time
          type: string
        status:
          enum:
            - REFUND_STATUS_UNSPECIFIED
            - FULLY_REFUNDED
            - PARTIALLY_REFUNDED
            - NOT_REFUNDED
            - REFUND_NOT_NECESSARY
          format: enum
          type: string
        timing:
          enum:
            - REFUND_TIMING_UNSPECIFIED
            - ON_START_RETURN_PROCESS
            - ON_ITEM_SENT
            - ON_ITEM_VERIFIED
          format: enum
          type: string
      type: object
    returns.TrackingInfoResponse_UploadDocumentsInfo:
      properties:
        upload_documents_enabled:
          type: boolean
        uploaded_documents:
          items:
            $ref: '#/components/schemas/returns.UploadDocumentsInfo_UploadedDocuments'
          type: array
      type: object
    returns.UploadDocumentsInfo_UploadedDocuments:
      properties:
        document_info:
          type: string
        document_url:
          type: string
      type: object
