openapi: 3.0.0
info:
  title: Stallion Express API
  version: '3.0'
  x-logo:
    url: https://ship.stallionexpress.ca/images/StallionExpress-Black-Logo.png
    backgroundColor: '#FFFFFF'
    altText: Stallion Express
    href: https://ship.stallionexpress.ca
  contact:
    name: API Support
    email: developersupport@stallionexpress.ca
  description: >-
    Access to the sandbox environment can be provided upon request. (Not all
    rates are available in the Sandbox environment). API token can be found
    under "Account Settings > API Token".
servers:
  - url: https://ship.stallionexpress.ca/api/v3
    description: Production server (uses live data)
  - url: https://sandbox.stallionexpress.ca/api/v3
    description: Sandbox server (uses test data)
security:
  - bearerAuth: []
paths:
  /postage-types:
    get:
      tags:
        - Postage Types
      summary: Get Postage Types
      description: Get a list of all available postage types
      operationId: getPostageTypes
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostageTypesResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /rates:
    post:
      tags:
        - Shipments
      summary: Get Rates
      description: Validates shipment details and returns all available rates.
      operationId: getRates
      requestBody:
        description: Shipment details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RatesRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RatesResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /shipments:
    get:
      tags:
        - Shipments
      summary: Get Shipments
      description: Get the list of paginated shipments by different search parameters.
      operationId: getShipments
      parameters:
        - name: from_date
          in: query
          description: return shipments with a created_at on or after the given date
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: to_date
          in: query
          description: >-
            return shipments with a created_at greater than or equal to the
            given date.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: ship_code
          in: query
          description: search by ship code
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: to_name
          in: query
          description: search by recipient
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: tracking_code
          in: query
          description: search by tracking code
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: order_id
          in: query
          description: search by order id
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: batch_id
          in: query
          description: search by batch id
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: closeout_id
          in: query
          description: search by closeout id
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: status
          in: query
          description: search by shipment statuses
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - unpaid
                - postage-expired
                - pending
                - incomplete
                - ready
                - received
                - processing
                - in-transit
                - delivered
                - exception
                - void-requested
                - voided
                - complete
        - name: limit
          in: query
          description: number of records to return per page
          required: false
          style: form
          explode: true
          schema:
            type: integer
        - name: page
          in: query
          description: the current page number of the response
          required: false
          style: form
          explode: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShipmentsResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
    post:
      tags:
        - Shipments
      summary: Create Shipment
      description: Create a shipment and return the postage label.
      operationId: createShipment
      requestBody:
        description: >-
          The shipment object that needs to be created. Note that size fields
          are required for any shipments with the package type of Parcel.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShipmentRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShipmentResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /shipments/return-label:
    post:
      tags:
        - Shipments
      summary: Create Return Label
      description: Create the return label for a previous shipment.
      operationId: createReturnLabel
      requestBody:
        description: >-
          Send one or all of: ship_code, tracking_code, and order_id as a post
          parameter to create the return label for a previous shipment.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShipmentCreateReturnLabelRequest'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShipmentResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /track:
    get:
      tags:
        - Shipments
      summary: Track a Shipment
      description: Fetch a shipment tracking details by different search parameters
      operationId: track
      parameters:
        - name: ship_code
          in: query
          description: The ship_code or identifier of a shipment.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: tracking_code
          in: query
          description: The tracking number of a shipment.
          required: false
          style: form
          explode: true
          schema:
            type: string
        - name: order_id
          in: query
          description: The order id of a shipment.
          required: false
          style: form
          explode: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrackResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /shipments/{ship_code}:
    get:
      tags:
        - Shipments
      summary: Get Shipment
      description: Get a shipment
      operationId: getTracking
      parameters:
        - name: ship_code
          in: path
          description: The ship_code of a shipment.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShipmentResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /shipments/{ship_code}/void:
    get:
      tags:
        - Shipments
      summary: Void a Shipment
      description: Requests a void for a shipment with the provided id.
      operationId: voidShipment
      parameters:
        - name: ship_code
          in: path
          description: The ship_code of a shipment.
          required: true
          style: simple
          explode: false
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoidResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /batches:
    post:
      tags:
        - Batches
      summary: Create a batch
      description: Creates a new batch to be used when creating shipments.
      operationId: createBatch
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /locations:
    get:
      tags:
        - Locations
      summary: Get Locations
      description: Gets a list of all current Stallion Express locations.
      operationId: getLocations
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationsResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
  /credits:
    get:
      tags:
        - Credits
      summary: Get Credits
      description: Return the current account balance
      operationId: getCredits
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
      security:
        - bearerAuth: []
    post:
      tags:
        - Credits
      summary: Add Credits
      description: Add credits using hte account's default credit card
      operationId: addCredits
      requestBody:
        description: Amount of credits to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreditsRequest'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsResponse'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
components:
  schemas:
    ShipmentStatus:
      type: string
      enum:
        - Postage Expired
        - Pending
        - Incomplete
        - Ready
        - Received
        - Processing
        - In Transit
        - Delivered
        - Exception
        - Void Requested
        - Voided
        - Complete
    PackageCode:
      type: string
      enum:
        - parcel
        - legal_flat_rate_envelope
        - flat_rate_padded_envelope
        - small_flat_rate_box
        - medium_flat_rate_box_1
        - medium_flat_rate_box_2
        - large_flat_rate_box
        - regional_rate_box_a1
        - regional_rate_box_a2
        - regional_rate_box_b1
        - regional_rate_box_b2
        - letter
        - large_envelope_or_flat
        - thick_envelope
    PackageType:
      type: string
      enum:
        - Parcel
        - Legal Flat Rate Envelope
        - Flat Rate PAdded Envelope
        - Small Flat Rate Box
        - Medium Flat Rate Box 1
        - Medium Flat Rate Box 2
        - Large Flat Rate Box
        - Regional Rate Box A1
        - Regional Rate Box A2
        - Regional Rate Box B1
        - Regional Rate Box B2
        - Letter
        - Large Envelope Or Flat
        - Thick Envelope
    PostageCode:
      type: string
      enum:
        - usps_first_class_mail
        - usps_priority_mail
        - usps_priority_mail_express
        - usps_parcel_select_ground
        - usps_media_mail
        - usps_library_mail
        - usps_express_mail_international
        - usps_priority_mail_international
        - usps_first_class_mail_international
        - fedex_ground
        - ups_standard
        - postnl_international_packet
        - postnl_international_packet_tracked
        - apc_priority_worldwide
        - apc_priority_worldwide_tracked
        - apc_priority_worldwide_expedited
        - apc_priority_worldwide_expedited_ddp_
        - stallion_economy_usa
        - stallion_economy_ca
        - us_economy
    PostageType:
      type: string
      enum:
        - USPS First Class Mail
        - USPS Priority Mail
        - USPS Priority Mail Express
        - USPS Parcel Select Ground
        - USPS Media Mail
        - USPS Library Mail
        - USPS Express Mail International
        - USPS Priority Mail International
        - USPS First Class Mail International
        - FedEx Ground
        - UPS Standard
        - PostNL International Packet
        - PostNL International Packet Tracked
        - APC Priority Worldwide
        - APC Priority Worldwide Tracked
        - APC Priority Worldwide Expedited
        - APC Priority Worldwide Expedited(DDP)
        - Stallion Economy USA
        - Stallion Economy CA
        - US Economy
    WeightUnit:
      type: string
      enum:
        - lbs
        - kg
        - g
        - oz
    SizeUnit:
      type: string
      enum:
        - cm
        - in
    Currency:
      type: string
      enum:
        - CAD
        - USD
        - EUR
        - AUD
        - GBP
    RegionCode:
      description: >-
        Default account region. The region where the shipment will be delivered
        to Stallion. Ability to change this is needs to be enabled by Stallion.
      type: string
      nullable: true
      enum:
        - 'ON'
        - BC
        - QC
      example: null
    RegionName:
      type: string
      enum:
        - Ontario
        - British Columbia
        - Quebec
    RatesRequest:
      required:
        - address1
        - city
        - country_code
        - currency
        - name
        - package_contents
        - package_type
        - postal_code
        - province_code
        - size_unit
        - value
        - weight
        - weight_unit
      type: object
      properties:
        name:
          type: string
          example: Pramod Thomson
          maxLength: 40
        address1:
          type: string
          example: 30 Clearview Dr
          maxLength: 35
        address2:
          type: string
          example: Lot 2
          nullable: true
          maxLength: 35
        city:
          type: string
          example: Rock Springs
          maxLength: 35
        province_code:
          type: string
          example: WY
          minLength: 2
          maxLength: 2
        postal_code:
          type: string
          example: '82901'
          maxLength: 10
        country_code:
          type: string
          example: US
          minLength: 2
          maxLength: 2
        email:
          type: string
          example: test@stallionexpress.ca
        phone:
          type: string
          example: 11231231234
        weight_unit:
          $ref: '#/components/schemas/WeightUnit'
        weight:
          type: number
          example: 0.6
        length:
          type: number
          example: 9
        width:
          type: number
          example: 12
        height:
          type: number
          example: 1
        size_unit:
          $ref: '#/components/schemas/SizeUnit'
        package_contents:
          type: string
          example: Two pair of socks
        value:
          type: number
          example: 10
        currency:
          $ref: '#/components/schemas/Currency'
        package_type:
          oneOf:
            - $ref: '#/components/schemas/PackageType'
            - $ref: '#/components/schemas/PackageCode'
        postage_types:
          type: array
          nullable: true
          description: Limit the results to specific postage types
          example: []
          items:
            oneOf:
              - $ref: '#/components/schemas/PostageType'
              - $ref: '#/components/schemas/PostageCode'
        signature_confirmation:
          type: boolean
          example: true
          nullable: true
        insured:
          type: boolean
          example: true
          nullable: true
        region:
          $ref: '#/components/schemas/RegionCode'
    BatchResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        batch_id:
          type: string
          example: '18179823'
    Rate:
      type: object
      properties:
        postage_type:
          $ref: '#/components/schemas/PostageType'
        package_type:
          $ref: '#/components/schemas/PackageType'
        trackable:
          type: boolean
          example: true
        base_rate:
          type: integer
          example: 10
        add_ons:
          type: array
          items:
            $ref: '#/components/schemas/Rate_add_ons'
        rate:
          type: integer
          example: 10
        tax:
          type: integer
        total:
          type: integer
        currency:
          $ref: '#/components/schemas/Currency'
        delivery_days:
          type: string
          example: '2'
    RatesResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        rates:
          type: array
          items:
            $ref: '#/components/schemas/Rate'
    PostageTypesResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        postage_types:
          type: array
          items:
            $ref: '#/components/schemas/PostageType'
    LocationsResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        locations:
          type: array
          items:
            $ref: '#/components/schemas/LocationsResponse_locations'
    ShipmentRequest:
      required:
        - address1
        - city
        - country_code
        - currency
        - name
        - package_contents
        - package_type
        - postage_type
        - postal_code
        - province_code
        - size_unit
        - value
        - weight
        - weight_unit
      type: object
      properties:
        name:
          type: string
          example: Pramod Thomson
          maxLength: 40
        address1:
          type: string
          example: 30 Clearview Dr
          maxLength: 35
        address2:
          type: string
          example: Lot 2
          maxLength: 35
        city:
          type: string
          example: Rock Springs
          maxLength: 35
        province_code:
          type: string
          example: WY
          minLength: 2
          maxLength: 2
        postal_code:
          type: string
          example: '82901'
          maxLength: 10
        country_code:
          type: string
          example: US
          minLength: 2
          maxLength: 2
        email:
          type: string
          example: test@stallionexpress.ca
        phone:
          type: string
          example: 11231231234
        order_id:
          type: string
          example: 1234-1233
          nullable: true
        weight_unit:
          $ref: '#/components/schemas/WeightUnit'
        weight:
          type: number
          example: 0.6
        length:
          type: number
          example: 9
        width:
          type: number
          example: 12
        height:
          type: number
          example: 1
        size_unit:
          $ref: '#/components/schemas/SizeUnit'
        package_contents:
          type: string
          example: Two pair of socks
          maxLength: 255
        value:
          type: number
          example: 10
        currency:
          $ref: '#/components/schemas/Currency'
        package_type:
          oneOf:
            - $ref: '#/components/schemas/PackageType'
            - $ref: '#/components/schemas/PackageCode'
        signature_confirmation:
          description: Default false.
          type: boolean
          example: false
          nullable: true
        postage_type:
          oneOf:
            - $ref: '#/components/schemas/PostageType'
            - $ref: '#/components/schemas/PostageCode'
        label_format:
          description: Default pdf. Set the format of the returned label.
          type: string
          enum:
            - pdf
            - zpl
            - png
          default: pdf
        is_fba:
          description: Default false. Set to true to create a Stallion FBA label.
          type: boolean
          example: false
          nullable: true
          default: false
        insured:
          description: Set to true to apply Stallion Protection for tracked shipments only.
          type: boolean
          example: true
          nullable: true
        customs_lines:
          description: >-
            Optional field. Can be used to explicitly set customs declaration
            for international shipments. Leave empty if unsure.
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ShipmentRequest_customs_lines'
        region:
          $ref: '#/components/schemas/RegionCode'
    ShipmentCreateReturnLabelRequest:
      required:
        - order_id
        - ship_code
        - tracking_code
      type: object
      properties:
        ship_code:
          type: string
          example: 210907WY78
        tracking_code:
          type: string
          example: '940002312332'
        order_id:
          type: string
          example: '40011'
    ShipmentResponse:
      type: object
      properties:
        success:
          type: boolean
        label:
          description: Base 64 encoded label.
          type: string
          example: base64_label
        tracking_code:
          type: string
          example: '9400111969000940000011'
        message:
          type: string
          example: Shipment successfully completed
        shipment:
          $ref: '#/components/schemas/ShipmentResponse_shipment'
        rate:
          $ref: '#/components/schemas/Rate'
    ShipmentsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ShipmentsResponse_data'
        links:
          $ref: '#/components/schemas/ShipmentsResponse_links'
        meta:
          $ref: '#/components/schemas/ShipmentsResponse_meta'
    ValidationError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        errors:
          type: array
          items:
            type: string
            example: The data you entered is invalid
    TrackResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        status:
          $ref: '#/components/schemas/ShipmentStatus'
        events:
          type: array
          items:
            $ref: '#/components/schemas/TrackResponse_events'
        details:
          type: object
          properties:
            ship_code:
              type: string
              example: 2012121234
            destination:
              type: string
              example: Toronto ON, CA
            tracking:
              type: string
              example: '123123123123123123'
            url:
              type: string
              example: https://carrier.com/track/9400111969000940000011
            carrier_phone:
              type: string
              example: '12312341234'
    VoidResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: boolean
          example: false
    CreditsResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        amount:
          type: string
          example: '0.00'
    CreditsRequest:
      type: object
      properties:
        amount:
          type: integer
          format: int64
          example: 100
    UnauthenticatedError:
      type: object
      properties:
        message:
          type: string
          example: Unauthenticated.
    InternalError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        errors:
          type: array
          items:
            type: string
            example: An unknown error occured
    NotFoundResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        errors:
          type: array
          items:
            type: string
            example: No shipment found
    Rate_return_address:
      type: object
      properties:
        address1:
          type: string
          example: Unit 5 - 2045 Niagara Falls Blvd
        address2:
          type: string
          example: SE
        city:
          type: string
          example: Niagara Falls
        postal_code:
          type: string
          example: '14304'
        province_code:
          type: string
          example: NY
        country_code:
          type: string
          example: US
        phone:
          type: string
          example: '8778637447'
        name:
          type: string
          example: Jane Doe
      example: null
    Rate_add_ons:
      type: object
      properties:
        name:
          type: string
          example: USPS Signature Confirmation
        type:
          type: string
          example: signature_confirmation
        cost:
          type: number
          example: 2.65
        currency:
          $ref: '#/components/schemas/Currency'
        return_address:
          $ref: '#/components/schemas/Rate_return_address'
      example: null
    LocationsResponse_locations:
      type: object
      properties:
        name:
          type: string
          example: Mississauga HQ
        type:
          type: string
          example: Branch
        address1:
          type: string
          example: 6691 Edwards Blvd
        city:
          type: string
          example: Mississauga
        province_code:
          type: string
          example: 'ON'
        postal_code:
          type: string
          example: L5T 2H8
        country_code:
          type: string
          example: CA
      example: null
    ShipmentRequest_customs_lines:
      type: object
      properties:
        description:
          type: string
          example: Cool T-Shirt
        quantity:
          type: number
          example: 1
        hs_code:
          type: string
          example: '620800'
        weight:
          type: number
          example: 0.6
        weight_unit:
          $ref: '#/components/schemas/WeightUnit'
        value:
          type: number
          example: 10
        currency:
          $ref: '#/components/schemas/Currency'
        country_of_origin:
          type: string
          example: CN
      example: null
    ShipmentResponse_shipment:
      type: object
      properties:
        ship_code:
          type: string
          example: 2019JHSJDHSJ
        name:
          type: string
          example: Pramod Thomson
        address1:
          type: string
          example: 30 Clearview Dr
        address2:
          type: string
          example: Lot 2
        city:
          type: string
          example: Rock Springs
        province_code:
          type: string
          example: WY
        postal_code:
          type: string
          example: '82901'
        country_code:
          type: string
          example: US
        weight_unit:
          $ref: '#/components/schemas/WeightUnit'
        weight:
          type: number
          example: 0.6
        length:
          type: number
          example: 9
        width:
          type: number
          example: 12
        height:
          type: number
          example: 1
        size_unit:
          $ref: '#/components/schemas/SizeUnit'
        package_contents:
          type: string
          example: 3 underwear
        value:
          type: number
          example: 10
        currency:
          $ref: '#/components/schemas/Currency'
        package_type:
          $ref: '#/components/schemas/PackageType'
        postage_type:
          $ref: '#/components/schemas/PostageType'
        region:
          $ref: '#/components/schemas/RegionName'
        tracking_code:
          type: string
          example: '9400111969000940000011'
        rate:
          type: integer
          example: 9
        tax:
          type: integer
        total_paid:
          type: integer
        insured:
          type: boolean
          example: true
      example: null
    ShipmentsResponse_data:
      type: object
      properties:
        ship_code:
          type: string
          example: 2019JHSJDHSJ
        name:
          type: string
          example: Pramod Thomson
        address1:
          type: string
          example: 30 Clearview Dr
        address2:
          type: string
          example: Lot 2
        city:
          type: string
          example: Rock Springs
        province_code:
          type: string
          example: WY
        postal_code:
          type: string
          example: '82901'
        country_code:
          type: string
          example: US
        weight_unit:
          $ref: '#/components/schemas/WeightUnit'
        weight:
          type: number
          example: 0.6
        length:
          type: number
          example: 9
        width:
          type: number
          example: 12
        height:
          type: number
          example: 1
        size_unit:
          $ref: '#/components/schemas/SizeUnit'
        package_contents:
          type: string
          example: 3 underwear
        value:
          type: number
          example: 10
        currency:
          $ref: '#/components/schemas/Currency'
        package_type:
          $ref: '#/components/schemas/PackageType'
        postage_type:
          $ref: '#/components/schemas/PostageType'
        tracking_code:
          type: string
          example: '9400111969000940000011'
        rate:
          type: integer
          example: 9
        tax:
          type: integer
        total_paid:
          type: integer
        insured:
          type: boolean
          example: true
      example: null
    ShipmentsResponse_links:
      type: object
      properties:
        first:
          type: string
          example: https://sandbox.stallionexpress.ca/api/v3/shipments?page=1
        last:
          type: string
          example: https://sandbox.stallionexpress.ca/api/v3/shipments?page=16
        prev:
          type: string
          example: https://sandbox.stallionexpress.ca/api/v3/shipments?page=1
        next:
          type: string
          example: https://sandbox.stallionexpress.ca/api/v3/shipments?page=3
      example: null
    ShipmentsResponse_meta:
      type: object
      properties:
        current_page:
          type: integer
          example: 2
        from:
          type: integer
          example: 11
        last_page:
          type: integer
          example: 16
        path:
          type: string
          example: https://sandbox.stallionexpress.ca/api/v3/shipments
        per_page:
          type: integer
          example: 10
      example: null
    TrackResponse_events:
      type: object
      properties:
        carrier:
          type: string
          example: USPS
        location:
          type: string
          example: Mississauga ON, CA
        status:
          type: string
          example: In-transit from Mississauga ON, CA
        datetime:
          type: string
          example: '2020-06-24 11:40:15'
        tracking:
          type: string
          example: '9400111969000940000011'
      example: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
