openapi: 3.0.1
info:
  title: Partner API
  version: v1
servers:
  - url: https://sandbox.bikeflights.com
    description: Sandbox server
paths:
  /api/Authentication/login:
    post:
      tags:
        - Authentication
      summary: User login functionality
      description: >-
        In production you will authenticate with your Bikeflights.com username
        and password, in development you will be given a development login
      operationId: LoginUser
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Login'
            example:
              email: user2332b5e4-df34-4c79-affe-0c12cdd402a6@bikeflights.com
              password: 1Pass4Test!
          text/json:
            schema:
              $ref: '#/components/schemas/Login'
            example:
              email: user2332b5e4-df34-4c79-affe-0c12cdd402a6@bikeflights.com
              password: 1Pass4Test!
          application/*+json:
            schema:
              $ref: '#/components/schemas/Login'
            example:
              email: user2332b5e4-df34-4c79-affe-0c12cdd402a6@bikeflights.com
              password: 1Pass4Test!
      security:
        - {}
      responses:
        '200':
          description: OK
      x-order: 1
  /api/Data/countries:
    get:
      tags:
        - Data
      summary: Retrieves the current list of countries.
      description: "The countries with the property country.active set to true are the ones Bikeflights can ship from and to.\r\n This list may change over time. If you wish to incorporate it into your own validation, you are free to do so.\r\n If you do not validate before making a rate request, it will return a validation error."
      operationId: GetCountries
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Country'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Country'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Country'
        '404':
          description: Not Found
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /api/Labels/create-shop-label/{orderId}:
    post:
      tags:
        - Labels
      summary: Create labels associated with an order id
      description: >-
        Create shipping label from order id. The order id is received from the
        order/create-shop-order endpoint
      operationId: CreateLabel
      parameters:
        - name: orderId
          in: path
          description: ''
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AutoLabelResponseWrapper'
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AutoLabelResponseWrapper'
            text/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AutoLabelResponseWrapper'
  /api/Labels/shop-label/{trackingNumber}/{labelType}:
    get:
      tags:
        - Labels
      summary: Get the label associated with a tracking number
      description: Get previously created shipping labels, call create-shop-labels first
      operationId: GetLabel
      parameters:
        - name: trackingNumber
          in: path
          description: Shipping provider tracking number
          required: true
          schema:
            type: string
        - name: labelType
          in: path
          description: Options are "laser" or "thermal" depending on your needs
          required: true
          schema:
            type: string
            default: laser
      responses:
        '200':
          description: OK
  /api/Order/get-shop-orders:
    post:
      tags:
        - Order
      summary: Retrieves a paginated list of orders based on specified parameters.
      description: "The default values for parameters are as follows:\r\n- PageSize: 10\r\n- PageNumber: 0\r\n- Order: \"desc\"\r\n- OrderBy: \"orderId\"\r\n- shopOrderStatus: \"5\"\r\n- includeDeleted: false\r\n- subOrderBy: null\r\n- subOrder: \"desc\""
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetShopOrdersRequest'
            examples:
              Recent Orders Example:
                value:
                  pageSize: 10
                  pageNumber: 0
                  orderDirection: DESC
                  orderBy: orderId
                  shopOrderStatus: 5
                  includeDeleted: false
              Oldest Orders Example:
                value:
                  pageSize: 10
                  pageNumber: 0
                  orderDirection: ASC
                  orderBy: orderId
                  shopOrderStatus: 5
                  includeDeleted: false
          text/json:
            schema:
              $ref: '#/components/schemas/GetShopOrdersRequest'
            examples:
              Recent Orders Example:
                value:
                  pageSize: 10
                  pageNumber: 0
                  orderDirection: DESC
                  orderBy: orderId
                  shopOrderStatus: 5
                  includeDeleted: false
              Oldest Orders Example:
                value:
                  pageSize: 10
                  pageNumber: 0
                  orderDirection: ASC
                  orderBy: orderId
                  shopOrderStatus: 5
                  includeDeleted: false
          application/*+json:
            schema:
              $ref: '#/components/schemas/GetShopOrdersRequest'
            examples:
              Recent Orders Example:
                value:
                  pageSize: 10
                  pageNumber: 0
                  orderDirection: DESC
                  orderBy: orderId
                  shopOrderStatus: 5
                  includeDeleted: false
              Oldest Orders Example:
                value:
                  pageSize: 10
                  pageNumber: 0
                  orderDirection: ASC
                  orderBy: orderId
                  shopOrderStatus: 5
                  includeDeleted: false
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/Orders'
            application/json:
              schema:
                $ref: '#/components/schemas/Orders'
            text/json:
              schema:
                $ref: '#/components/schemas/Orders'
  /api/Order/create-shop-order:
    post:
      tags:
        - Order
      summary: Create shipping order
      description: Create shipping order from a request id and rate signature
      operationId: CreateOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopPaymentRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ShopPaymentRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ShopPaymentRequest'
      responses:
        '200':
          description: OK
  /api/PackageLocation/{trackingNumber}:
    get:
      tags:
        - PackageLocation
      summary: Gets the latest package location information
      description: Track package by tracking number
      operationId: TrackPackage
      parameters:
        - name: trackingNumber
          in: path
          description: One UPS tracking number, it should start with 1Z...
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/TrackingResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/TrackingResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/TrackingResponse'
  /api/ShopRate:
    post:
      tags:
        - ShopRate
      summary: Single endpoint to get shipping speed options
      description: Get shipping rates between two locations for up to twenty five packages
      operationId: GetRates
      requestBody:
        description: >-
          The Core.DTO.GetShopRatesRequest rate request with all shipment
          properties.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetShopRatesRequest'
            examples:
              Domestic Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      firstName: Travis
                      lastName: Hawkins
                      phoneNumber: '+15555555555'
                      address1: 701 Maple St
                      city: San Mateo
                      state: CA
                      postalCode: '94401'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      company: Bikeflights
                      firstName: William
                      lastName: Alcorn
                      phoneNumber: '+18885555555'
                      address1: 3505 Calle Cuervo
                      address2: '#315'
                      city: Albuquerque
                      state: NM
                      postalCode: '87124'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 45
                      height: 30
                      width: 12
                      linearUnit: IN
                      weight: 65
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8000'
                      insideDescription: Theres a bike in the box
                      outsideDescription: Cardboard box with bikeflights logo
              Domestic Example 2:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      company: Whitaker & Co.
                      firstName: Noah
                      lastName: Whitaker
                      phoneNumber: '+15555555555'
                      address1: 123 Easy St
                      city: Fort Bragg
                      state: CA
                      postalCode: '95437'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      company: Montoya Enterprises
                      firstName: Ava
                      lastName: Montoya
                      phoneNumber: '+18885555555'
                      address1: 501 Standard Dr
                      city: Rio Rancho
                      state: NM
                      postalCode: '87124'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 14
                      height: 10
                      width: 12
                      linearUnit: IN
                      weight: 5
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8003'
                      insideDescription: Bike parts
                      outsideDescription: Cardboard box with bike shop logo
              International Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      company: Calloway Systems
                      firstName: Ethan
                      lastName: Calloway
                      phoneNumber: '+15555555555'
                      address1: 555 Main St
                      city: Fort Bragg
                      state: CA
                      postalCode: '95437'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      firstName: Liam
                      lastName: Prescott
                      phoneNumber: '+18885555555'
                      address1: 40 rue Tiquetonne
                      city: Paris
                      state: ''
                      postalCode: '75002'
                      countryCode: FR
                      isResidential: false
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 10
                      height: 8
                      width: 6
                      linearUnit: IN
                      weight: 2
                      weightUnit: LB
                      value: 100
                      coverage: 100
                      protectionFee: 0
                      contentCode: '8003'
                      insideDescription: SRAM NX Eagle Derailleur
                      outsideDescription: Cardboard box with no markings
              Validation Error Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      firstName: Arthur
                      lastName: Pemberton
                      city: London
                      state: ''
                      postalCode: EC4M 7LD
                      countryCode: GB
                      isResidential: false
                      passedAvs: true
                    to:
                      company: Dupont Services International
                      firstName: Éloïse
                      lastName: Dupont
                      address1: 40 rue Tiquetonne
                      city: Paris
                      state: ''
                      postalCode: '75002'
                      countryCode: FR
                      isResidential: false
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4000'
                  packages:
                    - name: Custom
                      length: 14
                      height: 10
                      width: 12
                      linearUnit: IN
                      weight: 5
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8000'
                      insideDescription: There's a bike in the box
                      outsideDescription: Cardboard box with bikeflights logo
          text/json:
            schema:
              $ref: '#/components/schemas/GetShopRatesRequest'
            examples:
              Domestic Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      firstName: Travis
                      lastName: Hawkins
                      phoneNumber: '+15555555555'
                      address1: 701 Maple St
                      city: San Mateo
                      state: CA
                      postalCode: '94401'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      company: Bikeflights
                      firstName: William
                      lastName: Alcorn
                      phoneNumber: '+18885555555'
                      address1: 3505 Calle Cuervo
                      address2: '#315'
                      city: Albuquerque
                      state: NM
                      postalCode: '87124'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 45
                      height: 30
                      width: 12
                      linearUnit: IN
                      weight: 65
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8000'
                      insideDescription: Theres a bike in the box
                      outsideDescription: Cardboard box with bikeflights logo
              Domestic Example 2:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      company: Whitaker & Co.
                      firstName: Noah
                      lastName: Whitaker
                      phoneNumber: '+15555555555'
                      address1: 123 Easy St
                      city: Fort Bragg
                      state: CA
                      postalCode: '95437'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      company: Montoya Enterprises
                      firstName: Ava
                      lastName: Montoya
                      phoneNumber: '+18885555555'
                      address1: 501 Standard Dr
                      city: Rio Rancho
                      state: NM
                      postalCode: '87124'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 14
                      height: 10
                      width: 12
                      linearUnit: IN
                      weight: 5
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8003'
                      insideDescription: Bike parts
                      outsideDescription: Cardboard box with bike shop logo
              International Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      company: Calloway Systems
                      firstName: Ethan
                      lastName: Calloway
                      phoneNumber: '+15555555555'
                      address1: 555 Main St
                      city: Fort Bragg
                      state: CA
                      postalCode: '95437'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      firstName: Liam
                      lastName: Prescott
                      phoneNumber: '+18885555555'
                      address1: 40 rue Tiquetonne
                      city: Paris
                      state: ''
                      postalCode: '75002'
                      countryCode: FR
                      isResidential: false
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 10
                      height: 8
                      width: 6
                      linearUnit: IN
                      weight: 2
                      weightUnit: LB
                      value: 100
                      coverage: 100
                      protectionFee: 0
                      contentCode: '8003'
                      insideDescription: SRAM NX Eagle Derailleur
                      outsideDescription: Cardboard box with no markings
              Validation Error Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      firstName: Arthur
                      lastName: Pemberton
                      city: London
                      state: ''
                      postalCode: EC4M 7LD
                      countryCode: GB
                      isResidential: false
                      passedAvs: true
                    to:
                      company: Dupont Services International
                      firstName: Éloïse
                      lastName: Dupont
                      address1: 40 rue Tiquetonne
                      city: Paris
                      state: ''
                      postalCode: '75002'
                      countryCode: FR
                      isResidential: false
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4000'
                  packages:
                    - name: Custom
                      length: 14
                      height: 10
                      width: 12
                      linearUnit: IN
                      weight: 5
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8000'
                      insideDescription: There's a bike in the box
                      outsideDescription: Cardboard box with bikeflights logo
          application/*+json:
            schema:
              $ref: '#/components/schemas/GetShopRatesRequest'
            examples:
              Domestic Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      firstName: Travis
                      lastName: Hawkins
                      phoneNumber: '+15555555555'
                      address1: 701 Maple St
                      city: San Mateo
                      state: CA
                      postalCode: '94401'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      company: Bikeflights
                      firstName: William
                      lastName: Alcorn
                      phoneNumber: '+18885555555'
                      address1: 3505 Calle Cuervo
                      address2: '#315'
                      city: Albuquerque
                      state: NM
                      postalCode: '87124'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 45
                      height: 30
                      width: 12
                      linearUnit: IN
                      weight: 65
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8000'
                      insideDescription: Theres a bike in the box
                      outsideDescription: Cardboard box with bikeflights logo
              Domestic Example 2:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      company: Whitaker & Co.
                      firstName: Noah
                      lastName: Whitaker
                      phoneNumber: '+15555555555'
                      address1: 123 Easy St
                      city: Fort Bragg
                      state: CA
                      postalCode: '95437'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      company: Montoya Enterprises
                      firstName: Ava
                      lastName: Montoya
                      phoneNumber: '+18885555555'
                      address1: 501 Standard Dr
                      city: Rio Rancho
                      state: NM
                      postalCode: '87124'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 14
                      height: 10
                      width: 12
                      linearUnit: IN
                      weight: 5
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8003'
                      insideDescription: Bike parts
                      outsideDescription: Cardboard box with bike shop logo
              International Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      company: Calloway Systems
                      firstName: Ethan
                      lastName: Calloway
                      phoneNumber: '+15555555555'
                      address1: 555 Main St
                      city: Fort Bragg
                      state: CA
                      postalCode: '95437'
                      countryCode: US
                      isResidential: true
                      passedAvs: true
                    to:
                      firstName: Liam
                      lastName: Prescott
                      phoneNumber: '+18885555555'
                      address1: 40 rue Tiquetonne
                      city: Paris
                      state: ''
                      postalCode: '75002'
                      countryCode: FR
                      isResidential: false
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4001'
                  packages:
                    - name: Custom
                      length: 10
                      height: 8
                      width: 6
                      linearUnit: IN
                      weight: 2
                      weightUnit: LB
                      value: 100
                      coverage: 100
                      protectionFee: 0
                      contentCode: '8003'
                      insideDescription: SRAM NX Eagle Derailleur
                      outsideDescription: Cardboard box with no markings
              Validation Error Example 1:
                value:
                  shopName: TestShop
                  stage:
                    dateType: S
                    actionDate: '2025-04-24'
                    stage: 0
                    from:
                      firstName: Arthur
                      lastName: Pemberton
                      city: London
                      state: ''
                      postalCode: EC4M 7LD
                      countryCode: GB
                      isResidential: false
                      passedAvs: true
                    to:
                      company: Dupont Services International
                      firstName: Éloïse
                      lastName: Dupont
                      address1: 40 rue Tiquetonne
                      city: Paris
                      state: ''
                      postalCode: '75002'
                      countryCode: FR
                      isResidential: false
                      passedAvs: true
                    isPickup: true
                  purposeCode: '4000'
                  packages:
                    - name: Custom
                      length: 14
                      height: 10
                      width: 12
                      linearUnit: IN
                      weight: 5
                      weightUnit: LB
                      value: 1000
                      coverage: 1000
                      protectionFee: 0
                      contentCode: '8000'
                      insideDescription: There's a bike in the box
                      outsideDescription: Cardboard box with bikeflights logo
      responses:
        '200':
          description: Rates Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiExamples_GetShopRatesResponse'
              examples:
                Rates Example 1:
                  value:
                    rates:
                      - name: UPS Next Day Air
                        shortName: UNDA
                        code: '01'
                        upsTransitDays: 1
                        transitDays: 2
                        rateSignature: XVNk1lhLp436OmsUasxcnOPwKA1yfvyVx7T/2daHW/E=
                        upsShip: '2025-03-13'
                        ship: '2025-03-13'
                        upsDeliver: '2025-03-14'
                        deliver: '2025-03-17'
                        rate: 249.95
                        provider: UPS
                        customsCost: 0
                        protectionCost: 15.1
                        protectionCoverage: 1000
                        pickupCost: 5
                        subTotal: 270.05
                        discount: 0
                        total: 270.05
                      - name: UPS 2nd Day Air
                        shortName: U2DAY
                        code: '02'
                        upsTransitDays: 2
                        transitDays: 3
                        rateSignature: vxcVZAdX9AAFP7oxsfIf79NAT2jg1/G8+IF2mG2Dc88=
                        upsShip: '2025-03-13'
                        ship: '2025-03-13'
                        upsDeliver: '2025-03-17'
                        deliver: '2025-03-18'
                        rate: 114.65
                        provider: UPS
                        customsCost: 0
                        protectionCost: 15.1
                        protectionCoverage: 1000
                        pickupCost: 5
                        subTotal: 134.75
                        discount: 0
                        total: 134.75
                      - name: UPS Ground
                        shortName: UGRND
                        code: '03'
                        upsTransitDays: 3
                        transitDays: 4
                        rateSignature: Eh8mo82577Voh3Zils+2TBJ977FBH2jhajElv28oC2M=
                        upsShip: '2025-03-13'
                        ship: '2025-03-13'
                        upsDeliver: '2025-03-18'
                        deliver: '2025-03-19'
                        rate: 61.59
                        provider: UPS
                        customsCost: 0
                        protectionCost: 15.1
                        protectionCoverage: 1000
                        pickupCost: 5
                        subTotal: 81.69
                        discount: 0
                        total: 81.69
                    requestId: ZdZ1bL97kQQg4mhXXrPX
                Rates Example 2:
                  value:
                    rates:
                      - name: UPS Next Day Air
                        shortName: UNDA
                        code: '01'
                        upsTransitDays: 1
                        transitDays: 2
                        rateSignature: XVNk1lhLp436OmsUasxcnOPwKA1yfvyVx7T/2daHW/E=
                        upsShip: '2025-03-13'
                        ship: '2025-03-13'
                        upsDeliver: '2025-03-14'
                        deliver: '2025-03-17'
                        rate: 70.85
                        provider: UPS
                        customsCost: 0
                        protectionCost: 15.1
                        protectionCoverage: 1000
                        pickupCost: 5
                        subTotal: 90.95
                        discount: 0
                        total: 90.95
                      - name: UPS 2nd Day Air
                        shortName: U2DAY
                        code: '02'
                        upsTransitDays: 2
                        transitDays: 3
                        rateSignature: vxcVZAdX9AAFP7oxsfIf79NAT2jg1/G8+IF2mG2Dc88=
                        upsShip: '2025-03-13'
                        ship: '2025-03-13'
                        upsDeliver: '2025-03-17'
                        deliver: '2025-03-18'
                        rate: 29.05
                        provider: UPS
                        customsCost: 0
                        protectionCost: 15.1
                        protectionCoverage: 1000
                        pickupCost: 5
                        subTotal: 49.15
                        discount: 0
                        total: 49.15
                      - name: UPS Ground
                        shortName: UGRND
                        code: '03'
                        upsTransitDays: 3
                        transitDays: 4
                        rateSignature: Eh8mo82577Voh3Zils+2TBJ977FBH2jhajElv28oC2M=
                        upsShip: '2025-03-13'
                        ship: '2025-03-13'
                        upsDeliver: '2025-03-18'
                        deliver: '2025-03-19'
                        rate: 21.79
                        provider: UPS
                        customsCost: 0
                        protectionCost: 15.1
                        protectionCoverage: 1000
                        pickupCost: 5
                        subTotal: 41.89
                        discount: 0
                        total: 41.89
                    requestId: ugJu2RYT9roSe94fka0N
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiExamples_GetRatesValidationResponse'
              examples:
                Rates Validation Example 1:
                  value:
                    type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                    title: One or more validation errors occurred.
                    status: 400
                    errors:
                      Stage.From.Address1:
                        - The Address1 field is required.
                    traceId: 00-85787a50c734b5a587f48e3f2c8d76f5-60ab819b571b3c79-00
                Rates Validation Example 2:
                  value:
                    type: https://tools.ietf.org/html/rfc9110#section-15.5.1
                    title: One or more validation errors occurred.
                    status: 400
                    errors:
                      Stage.From.Address1:
                        - The Address1 field is required.
                      Stage.From.City:
                        - The City field is required.
                    traceId: 00-abacba5efdbd0be0273937edabce04fd-1c05bb56509ca1a8-00
components:
  schemas:
    AddressRequest:
      required:
        - address1
        - city
        - countryCode
        - postalCode
      type: object
      properties:
        company:
          type: string
          nullable: true
          example: BIKEFLIGHTS LLC
        firstName:
          type: string
          nullable: true
          example: Travis
        lastName:
          type: string
          nullable: true
          example: Hawkins
        phoneNumber:
          type: string
          nullable: true
          example: '16505555555'
        address1:
          minLength: 1
          type: string
          example: 8000 N Fowler Ave
        address2:
          type: string
          nullable: true
          example: Unit 5
        address3:
          type: string
          nullable: true
          example: ATTN Jeff
        city:
          minLength: 1
          type: string
          example: Portland
        state:
          type: string
          nullable: true
          example: OR
        postalCode:
          minLength: 1
          type: string
          example: '97217'
        countryCode:
          minLength: 1
          type: string
          example: US
        isResidential:
          type: boolean
          example: false
        passedAvs:
          type: boolean
          example: true
      additionalProperties: false
    ApiExamples_GetRatesValidationResponse:
      type: object
      additionalProperties: false
    ApiExamples_GetShopRatesResponse:
      type: object
      additionalProperties: false
    AutoLabelBoxResponse:
      type: object
      properties:
        boxId:
          type: integer
          format: int32
        trackingNumber:
          type: string
          nullable: true
      additionalProperties: false
    AutoLabelResponse:
      type: object
      properties:
        labeledTimeUtc:
          type: string
          format: date-time
        orderId:
          type: integer
          format: int32
        shipmentId:
          type: integer
          format: int32
        boxes:
          type: array
          items:
            $ref: '#/components/schemas/AutoLabelBoxResponse'
          nullable: true
      additionalProperties: false
    AutoLabelResponseWrapper:
      type: object
      properties:
        labelResponse:
          $ref: '#/components/schemas/AutoLabelResponse'
        errorResponse:
          $ref: '#/components/schemas/ShipmentErrorResponse'
      additionalProperties: false
    Country:
      type: object
      properties:
        countryId:
          type: integer
          format: int64
        code:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        phoneCountryCode:
          type: string
          nullable: true
        active:
          type: boolean
      additionalProperties: false
    DataList:
      type: object
      properties:
        entryId:
          type: integer
          format: int32
        tag:
          type: string
          nullable: true
        display:
          type: string
          nullable: true
        value:
          type: number
          format: double
        cost:
          type: number
          format: double
        sortOrder:
          type: integer
          format: int32
        afterText:
          type: string
          nullable: true
        code:
          type: string
          nullable: true
      additionalProperties: false
    ErrorMessage:
      type: object
      properties:
        code:
          type: string
          nullable: true
        message:
          type: string
          nullable: true
      additionalProperties: false
    GetShopOrdersRequest:
      type: object
      properties:
        pageSize:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        orderDirection:
          type: string
          nullable: true
        orderBy:
          type: string
          nullable: true
        shopOrderStatus:
          type: integer
          format: int32
        includeDeleted:
          type: boolean
      additionalProperties: false
    GetShopRatesProviderFilterItem:
      type: object
      properties:
        provider:
          type: string
          nullable: true
        include:
          type: boolean
      additionalProperties: false
    GetShopRatesRequest:
      required:
        - packages
        - purposeCode
        - shopName
        - stage
      type: object
      properties:
        shopName:
          minLength: 1
          type: string
        stage:
          $ref: '#/components/schemas/StageRequest'
        purposeCode:
          minLength: 1
          type: string
        packages:
          type: array
          items:
            $ref: '#/components/schemas/PackageRequest'
        providers:
          type: array
          items:
            $ref: '#/components/schemas/GetShopRatesProviderFilterItem'
          nullable: true
      additionalProperties: false
    Login:
      required:
        - email
        - password
      type: object
      properties:
        email:
          minLength: 1
          type: string
        password:
          minLength: 1
          type: string
        store:
          type: string
          nullable: true
      additionalProperties: false
    Orders:
      type: object
      properties:
        quantity:
          type: integer
          format: int32
        orderResponse:
          type: array
          items:
            $ref: '#/components/schemas/UserShipmentReport'
          nullable: true
      additionalProperties: false
    PackageRequest:
      type: object
      properties:
        name:
          type: string
          nullable: true
        length:
          type: number
          format: double
        height:
          type: number
          format: double
        width:
          type: number
          format: double
        linearUnit:
          type: string
          nullable: true
        weight:
          type: number
          format: double
        weightUnit:
          type: string
          nullable: true
        value:
          type: number
          format: double
        coverage:
          type: number
          format: double
        protectionFee:
          type: number
          format: double
          nullable: true
        contentOption:
          $ref: '#/components/schemas/DataList'
        contentCode:
          type: string
          nullable: true
        insideDescription:
          type: string
          nullable: true
        outsideDescription:
          type: string
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    ShipmentErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorMessage'
          nullable: true
      additionalProperties: false
    ShopOrderStatus:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - -1
      type: integer
      format: int32
    ShopPaymentRequest:
      type: object
      properties:
        requestId:
          type: string
          nullable: true
        rateSignature:
          type: string
          nullable: true
        purchaseOrder:
          type: string
          nullable: true
      additionalProperties: false
    StageRequest:
      required:
        - from
        - to
      type: object
      properties:
        dateType:
          type: string
          nullable: true
        actionDate:
          type: string
          format: date
        purposeOption:
          $ref: '#/components/schemas/DataList'
        purposeCode:
          type: string
          nullable: true
        stage:
          type: integer
          format: int32
        from:
          $ref: '#/components/schemas/AddressRequest'
        to:
          $ref: '#/components/schemas/AddressRequest'
        isPickup:
          type: boolean
      additionalProperties: false
    TrackingEvent:
      type: object
      properties:
        timeStamp:
          type: string
          format: date-time
        gmtOffset:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        exception:
          type: string
          nullable: true
        scantype:
          type: string
          nullable: true
        location:
          type: string
          nullable: true
        transportFacility:
          type: string
          nullable: true
        activityCode:
          type: string
          nullable: true
        activityDescription:
          type: string
          nullable: true
        activitySignedForByName:
          type: string
          nullable: true
        activityTime:
          type: string
          format: date-time
        activityDeliveryDateFromManifestIndicator:
          type: string
          nullable: true
        activityNextScheduleActivity:
          type: string
          nullable: true
        activityDocument:
          type: string
          nullable: true
        activityAdditionalAttribute:
          type: string
          nullable: true
        activityStatusType:
          type: string
          nullable: true
        activityStatusDescription:
          type: string
          nullable: true
        activityStatusCode:
          type: string
          nullable: true
      additionalProperties: false
    TrackingResponse:
      type: object
      properties:
        success:
          type: boolean
        errorMessage:
          type: string
          nullable: true
        scans:
          type: array
          items:
            $ref: '#/components/schemas/TrackingEvent'
          nullable: true
        trackingNumber:
          type: string
          nullable: true
        fromAddress:
          type: string
          nullable: true
        toAddress:
          type: string
          nullable: true
        shipDate:
          type: string
          format: date-time
        estimatedDelivery:
          type: string
          format: date-time
        actualDelivery:
          type: string
          format: date-time
        signer:
          type: string
          nullable: true
        shipped:
          type: boolean
        delivered:
          type: boolean
        progressLevel:
          type: string
          nullable: true
        altTrackingNumber:
          type: array
          items:
            type: string
          nullable: true
        statusFlags:
          $ref: '#/components/schemas/TrackingStatusFlags'
      additionalProperties: false
    TrackingStatusFlags:
      type: object
      properties:
        isLabeled:
          type: boolean
        isVoided:
          type: boolean
        isPickedUp:
          type: boolean
        isDroppedOff:
          type: boolean
        isInTransit:
          type: boolean
        isShipped:
          type: boolean
        hasNotification:
          type: boolean
        hasException:
          type: boolean
        isReturned:
          type: boolean
        isOutForDelivery:
          type: boolean
        isDelivered:
          type: boolean
        isDelayed:
          type: boolean
      additionalProperties: false
    UserShipmentReport:
      type: object
      properties:
        shipmentId:
          type: integer
          format: int64
        orderId:
          type: integer
          format: int64
        trackingNumber:
          type: string
          nullable: true
        recipientName:
          type: string
          nullable: true
        purchaseOrder:
          type: string
          nullable: true
        total:
          type: number
          format: double
        purchaseDate:
          type: string
          format: date
        shipDate:
          type: string
          format: date
        deliveryDate:
          type: string
          format: date
        labeled:
          type: boolean
        shipped:
          type: boolean
        delivered:
          type: boolean
        shopOrderStatus:
          $ref: '#/components/schemas/ShopOrderStatus'
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: |-
        Enter 'Bearer' [space] and then your token in the text input below.

        Example: 'Bearer abc123'
      name: Authorization
      in: header
security:
  - Bearer: []
