> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trackstarhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration Write Info

> The spec for all the write operations supported by an integration,
in [OpenAPI 3.1.0](https://swagger.io/specification/) format.
Also provides the connection-specific fields for an integration if you pass in the access token.



## OpenAPI

````yaml get /integrations/{integration_type}/{integration_name}/write-info
openapi: 3.1.0
info:
  description: >

    Trackstar is a Unified API that provides standard endpoints for Supply Chain
    Logistics. We currently offer an API for Warehouse Management Systems (WMS).
  title: Trackstar API
  version: 0.1.0
servers:
  - description: Trackstar API
    url: https://production.trackstarhq.com
security: []
tags: []
externalDocs:
  description: Trackstar API Documentation
  url: https://docs.trackstarhq.com
paths:
  /integrations/{integration_type}/{integration_name}/write-info:
    get:
      summary: Integration Write Info
      description: >-
        The spec for all the write operations supported by an integration,

        in [OpenAPI 3.1.0](https://swagger.io/specification/) format.

        Also provides the connection-specific fields for an integration if you
        pass in the access token.
      operationId: get_get_integration_write_info_endpoint
      parameters:
        - in: header
          name: x-trackstar-api-key
          description: Your organization-level Trackstar API key.
          schema:
            type: string
            example: <x-trackstar-api-key>
          required: true
        - in: header
          name: x-trackstar-access-token
          description: >-
            Optional. Pass this in to get connection-specific field information.
            Your user's access token for a specific integration (ShipHero,
            Extensiv, etc).
          schema:
            type: string
            example: <x-trackstar-access-token>
          required: false
        - in: path
          name: integration_type
          description: The type of integration to filter by.
          schema:
            type: string
            enum:
              - wms
              - freight
              - cart
              - carrier
              - erp
          required: true
        - in: path
          name: integration_name
          description: The name of the integration to filter by.
          schema:
            type: string
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PassthroughSchema'
              example:
                openapi: 3.1.0
                paths:
                  /wms/returns:
                    post:
                      requestBody:
                        content:
                          application/json:
                            schema:
                              $ref: >-
                                #/components/schemas/CreatewmsReturnOngoingSchema
                      responses:
                        '200':
                          description: Create WMS Return output
                components:
                  schemas:
                    CreatewmsReturnOngoingSchema:
                      type: object
                      properties:
                        return_number:
                          type: string
                          description: Return number
                        order_id:
                          type: string
                          description: >-
                            The ID of the order that the return is associated
                            with. Can be passed into the
                            [Order](/api-reference/wms-api/orders/get-item)
                            endpoint for more details.
                          example: order_id
                        warehouse_id:
                          type: string
                          description: >-
                            The ID of the warehouse receiving the return. Can be
                            passed into the
                            [Warehouse](/api-reference/wms-api/warehouses/get-item)
                            endpoint for more details.
                          example: warehouse
                        line_items:
                          type: array
                          description: A list of inventory items included in the return.
                          example:
                            - sku: TEST-SKU
                              expected_quantity: 1
                              return_cause: null
                          items:
                            $ref: '#/components/schemas/WmsReturnWriteLineItemongoing'
                        tracking_number:
                          type: string
                          description: ''
                        tracking_url:
                          type: string
                          description: ''
                        trackstar_tags:
                          type:
                            - array
                            - 'null'
                          description: >-
                            A list of custom tags associated with the resource.
                            A tag can be either a string or a dictionary with
                            one key-value pair.
                          example:
                            - tag1
                            - tag2
                            - tag3: value3
                          items: {}
                      required:
                        - line_items
                        - order_id
                        - return_number
                      additionalProperties: false
                      title: CreatewmsReturnOngoingSchema
                    WmsReturnWriteLineItemongoing:
                      type: object
                      properties:
                        sku:
                          type: string
                          description: ''
                        expected_quantity:
                          type: integer
                          description: ''
                          example: 0
                        return_cause:
                          $ref: '#/components/schemas/ReturnCause'
                      required:
                        - expected_quantity
                        - sku
                      additionalProperties: false
                      title: WmsReturnWriteLineItemongoing
                    ReturnCause:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                            - '1'
                            - '13'
                            - '3'
                          description: >-
                            The reason code for this return. Specific to your
                            connection.
                        return_reason:
                          type:
                            - string
                            - 'null'
                          enum:
                            - damaged
                            - wrong size
                            - no longer needed
                          description: >-
                            The reason description for this return. Specific to
                            your connection.
                      required:
                        - code
                      additionalProperties: false
                      title: ReturnCause
          description: OpenAPI 3.1.0 formatted JSON
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
          description: Validation error
components:
  schemas:
    PassthroughSchema:
      type: object
      properties: {}
      additionalProperties: false
      title: PassthroughSchema
    HTTPError:
      properties:
        error:
          type: string
        id:
          type: string
          description: The ID of the item that wasn't found.
      required:
        - error
      type: object
      title: HTTPError
    ValidationError:
      properties:
        error:
          type: string
        detail:
          type: object
          properties:
            <location>:
              type: object
              properties:
                <field_name>:
                  type: array
                  items:
                    type: string
      required:
        - error
      type: object
      title: ValidationError

````