openapi: 3.0.3
info:
  title: AllDayShirts.com
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://api.rjrcenterport.com'
paths:
  /api/login:
    post:
      summary: Authentication.
      operationId: authentication
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"token\": \"example-token\",\n  \"expire\":\"expire date\"\n  \"user\": {\n    \"id\": 1,\n    \"name\": \"John Doe\",\n    \"email\": \"john@example.com\"\n  }\n}"
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'Email address of registered wholesale account.'
                  example: lindsey.lemke@example.com
                  nullable: false
                password:
                  type: string
                  description: 'The password for the wholesale account.'
                  example: 'xXGh?^r-<hU''e"I0.uT'
                  nullable: false
              required:
                - email
                - password
      security: []
  /api/logout:
    post:
      summary: 'Log out the authenticated user.'
      operationId: logOutTheAuthenticatedUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Logged out'
                properties:
                  message:
                    type: string
                    example: 'Logged out'
      tags:
        - Authentication
  '/api/v1/order/{orderId}':
    get:
      summary: 'GET - Order'
      operationId: gETOrder
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  orderId: 0
                  invoiceNo: ''
                  poNumber: ''
                  orderDate: ''
                  orderStatus: Shipped
                  shippingAddress:
                    firstName: ''
                    lastName: ''
                    company: ''
                    address: ''
                    address2: ''
                    city: ''
                    state: ''
                    country: ''
                    zip: ''
                  billingAddress:
                    firstName: ''
                    lastName: ''
                    company: ''
                    address: ''
                    address2: ''
                    city: ''
                    state: ''
                    country: ''
                    zip: ''
                  subtotal: '0.00'
                  shippingcost: '0.00'
                  sales_tax: '0.00'
                  orderamount: '0.00'
                  lines:
                    -
                      warehouseId: SAN
                      trackingNumber: ''
                      shipmentDate: ''
                      carrier: ''
                      volume: 0
                      weight: 0
                      items:
                        -
                          partId: ''
                          quantity: 0
                properties:
                  orderId:
                    type: integer
                    example: 0
                  invoiceNo:
                    type: string
                    example: ''
                  poNumber:
                    type: string
                    example: ''
                  orderDate:
                    type: string
                    example: ''
                  orderStatus:
                    type: string
                    example: Shipped
                  shippingAddress:
                    type: object
                    properties:
                      firstName:
                        type: string
                        example: ''
                      lastName:
                        type: string
                        example: ''
                      company:
                        type: string
                        example: ''
                      address:
                        type: string
                        example: ''
                      address2:
                        type: string
                        example: ''
                      city:
                        type: string
                        example: ''
                      state:
                        type: string
                        example: ''
                      country:
                        type: string
                        example: ''
                      zip:
                        type: string
                        example: ''
                  billingAddress:
                    type: object
                    properties:
                      firstName:
                        type: string
                        example: ''
                      lastName:
                        type: string
                        example: ''
                      company:
                        type: string
                        example: ''
                      address:
                        type: string
                        example: ''
                      address2:
                        type: string
                        example: ''
                      city:
                        type: string
                        example: ''
                      state:
                        type: string
                        example: ''
                      country:
                        type: string
                        example: ''
                      zip:
                        type: string
                        example: ''
                  subtotal:
                    type: string
                    example: '0.00'
                  shippingcost:
                    type: string
                    example: '0.00'
                  sales_tax:
                    type: string
                    example: '0.00'
                  orderamount:
                    type: string
                    example: '0.00'
                  lines:
                    type: array
                    example:
                      -
                        warehouseId: SAN
                        trackingNumber: ''
                        shipmentDate: ''
                        carrier: ''
                        volume: 0
                        weight: 0
                        items:
                          -
                            partId: ''
                            quantity: 0
                    items:
                      type: object
                      properties:
                        warehouseId:
                          type: string
                          example: SAN
                        trackingNumber:
                          type: string
                          example: ''
                        shipmentDate:
                          type: string
                          example: ''
                        carrier:
                          type: string
                          example: ''
                        volume:
                          type: integer
                          example: 0
                        weight:
                          type: integer
                          example: 0
                        items:
                          type: array
                          example:
                            -
                              partId: ''
                              quantity: 0
                          items:
                            type: object
                            properties:
                              partId:
                                type: string
                                example: ''
                              quantity:
                                type: integer
                                example: 0
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Product not found'
                properties:
                  error:
                    type: string
                    example: 'Product not found'
      tags:
        - Orders
      security: []
    parameters:
      -
        in: path
        name: orderId
        description: ''
        example: 4484622.2009704
        required: true
        schema:
          type: number
  /api/v1/orderpo:
    post:
      summary: 'POST - Order'
      operationId: pOSTOrder
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: '["order_id":999]'
      tags:
        - Orders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                poNumber:
                  type: string
                  description: 'Customer PO Number'
                  example: voluptatem
                  nullable: false
                autoselectWarehouse:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                shippingAddress:
                  type: object
                  description: 'The shipping address details.'
                  example: []
                  nullable: false
                  properties:
                    firstName:
                      type: string
                      description: 'The name of the customer.'
                      example: '"John"'
                      nullable: false
                    lastName:
                      type: string
                      description: 'optional The attention-to name for delivery.'
                      example: '"Doe"'
                      nullable: false
                    address:
                      type: string
                      description: 'The street address.'
                      example: '"123 Main St"'
                      nullable: false
                    city:
                      type: string
                      description: 'The city.'
                      example: '"Bolingbrook"'
                      nullable: false
                    state:
                      type: string
                      description: 'The state abbreviation.'
                      example: '"IL"'
                      nullable: false
                    zip:
                      type: string
                      description: 'The postal code.'
                      example: '"60440"'
                      nullable: false
                    company:
                      type: string
                      description: 'optional The attention-to name for delivery.'
                      example: '"Doe"'
                      nullable: false
                    address2:
                      type: string
                      description: 'optional The street address.'
                      example: '"123 Main St"'
                      nullable: false
                    residential:
                      type: boolean
                      description: 'Whether the address is residential.'
                      example: true
                      nullable: false
                lines:
                  type: array
                  description: 'The list of line items in the order.'
                  example:
                    -
                      warehouseId: CP
                      partId: B00760002
                      quantity: 2
                    -
                      warehouseId: SAN
                      partId: B00760004
                      quantity: 1
                  items:
                    type: string
                shipBlind:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                emailConfirmation:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                testOrder:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
              required:
                - poNumber
                - autoselectWarehouse
                - shippingAddress
                - lines
      security: []
  '/api/v1/order_status/{orderId}':
    get:
      summary: 'GET - Order Status'
      operationId: gETOrderStatus
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  orderId: '0'
                  invoiceNo: ''
                  orderDate: ''
                  orderStatus: ''
                properties:
                  orderId:
                    type: string
                    example: '0'
                  invoiceNo:
                    type: string
                    example: ''
                  orderDate:
                    type: string
                    example: ''
                  orderStatus:
                    type: string
                    example: ''
      tags:
        - Orders
      security: []
    parameters:
      -
        in: path
        name: orderId
        description: ''
        example: 1588.655
        required: true
        schema:
          type: number
  /api/v1/styles:
    get:
      summary: 'GET - Styles'
      operationId: gETStyles
      description: ''
      parameters:
        -
          in: query
          name: styles
          description: 'Get Multiple products by using commas'
          example: 'G500,G800'
          required: false
          schema:
            type: string
            description: 'Get Multiple products by using commas'
            example: 'G500,G800'
            nullable: false
        -
          in: query
          name: search
          description: 'Filters by search keyword, sku, category, brand'
          example: Gildan
          required: false
          schema:
            type: string
            description: 'Filters by search keyword, sku, category, brand'
            example: Gildan
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    sku: G500
                    productName: 'Adult Heavy Cotton T-Shirts'
                    brand: Gildan
                    category: T-Shirts
                  -
                    sku: G185
                    productName: 'Adult Heavy Blend 8 oz Hood'
                    brand: Gildan
                    category: Hoodies
      tags:
        - Products
      security: []
  '/api/v1/product/{style}':
    get:
      summary: 'GET - Product'
      operationId: gETProduct
      description: ''
      parameters:
        -
          in: query
          name: partId
          description: 'For multiple pass with comma separated.'
          example: CP0003683
          required: false
          schema:
            type: string
            description: 'For multiple pass with comma separated.'
            example: CP0003683
            nullable: false
        -
          in: query
          name: search
          description: 'Filters by search keyword, color, size and gtin.'
          example: Black
          required: false
          schema:
            type: string
            description: 'Filters by search keyword, color, size and gtin.'
            example: Black
            nullable: false
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "[\n\"style\": \"G500\",\n\"productName\": \"Adult Heavy Cotton 5.3 oz T-Shirt\",\n\"description\": \"For any crafter of custom t-shirts there are few blank t-shirt options better than the coveted Gildan G500.\",\n\"brand\": \"Gildan\",\n\"department\": \"Mens\",\n\"productType\": \"No Pocket\",\n\"fit\": \"Classic Fit\",\n\"feature\": \"Pre-Shrunk||Heavyweight\",\n\"fabric\": \"100% Cotton||Organic Cotton\",\n\"family\": \"Garment\",\n\"parts\":[{\n     \"partId\": \"CP0000009486\",\n     \"gtin\": \"00821780001350\",\n     \"color\": \"Daisy\",\n     \"swatch\": \"#F9F46F\",\n     \"size\": \"L\",\n     \"weight\": 0.455,\n     \"height\": 0.18,\n     \"width\": 15.75,\n     \"depth\": 21,\n    \"images\":[{\n        \"type\":\"front\",\n        \"url\":\"G500_DAISY_front.jpg\"\n    },{\n        \"type\":\"back\",\n        \"url\":\"G500_DAISY_back.jpg\"\n    }],\n    \"cdnUrl\":\"https://logoup-static-assets.s3.amazonaws.com/Alldayshirts_ProductImages/\",\n}]\n]"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Product not found'
                properties:
                  error:
                    type: string
                    example: 'Product not found'
      tags:
        - Products
      security: []
    parameters:
      -
        in: path
        name: style
        description: 'The Style of the product.'
        example: G500
        required: true
        schema:
          type: string
  '/api/v1/price/{style}':
    get:
      summary: 'GET - Price'
      operationId: gETPrice
      description: ''
      parameters:
        -
          in: query
          name: partId
          description: 'For multiple pass with comma separated.'
          example: CP0003683
          required: false
          schema:
            type: string
            description: 'For multiple pass with comma separated.'
            example: CP0003683
            nullable: false
        -
          in: query
          name: search
          description: 'Filters by search keyword, color, size and gtin.'
          example: Black
          required: false
          schema:
            type: string
            description: 'Filters by search keyword, color, size and gtin.'
            example: Black
            nullable: false
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "[{\n     \"partId\": \"CP0000009486\",\n     \"price\": \"00821780001350\",\n     \"name\": \"Daisy\",\n}]"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Product not found'
                properties:
                  error:
                    type: string
                    example: 'Product not found'
      tags:
        - Products
      security: []
    parameters:
      -
        in: path
        name: style
        description: 'The Style of the product.'
        example: G500
        required: true
        schema:
          type: string
  '/api/v1/inventory/{style}':
    get:
      summary: 'GET - Inventory'
      operationId: gETInventory
      description: ''
      parameters:
        -
          in: query
          name: partId
          description: 'For multiple pass with comma separated.'
          example: CP0003683
          required: false
          schema:
            type: string
            description: 'For multiple pass with comma separated.'
            example: CP0003683
            nullable: false
        -
          in: query
          name: search
          description: 'Filters by search keyword, color, size and gtin.'
          example: Black
          required: false
          schema:
            type: string
            description: 'Filters by search keyword, color, size and gtin.'
            example: Black
            nullable: false
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "[{\n     \"partId\": \"CP0000009486\",\n     \"color\": \"Black\",\n     \"size\" :\"XL\",\n     \"parts\": [{\n         \"warehouseId\"=>\"CP\",\n         \"warehouseName\"=>\"Fort Lauderdale, FL\",\n         \"quantity\"=>999,\n     }]\n}]"
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: 'Product not found'
                properties:
                  error:
                    type: string
                    example: 'Product not found'
      tags:
        - Products
      security: []
    parameters:
      -
        in: path
        name: style
        description: 'The Style of the product.'
        example: G500
        required: true
        schema:
          type: string
  /api/v1/products:
    get:
      summary: 'GET - Products'
      operationId: gETProducts
      description: 'Get a list of active styles and product info.'
      parameters:
        -
          in: query
          name: fields
          description: 'Optional. Comma-separated list of fields to return.'
          example: 'sku,partId,gtin,price,qty'
          required: false
          schema:
            type: string
            description: 'Optional. Comma-separated list of fields to return.'
            example: 'sku,partId,gtin,price,qty'
            nullable: false
        -
          in: query
          name: gtins
          description: 'Optional. Comma-separated GTINs to filter.'
          example: '00821780058739'
          required: false
          schema:
            type: string
            description: 'Optional. Comma-separated GTINs to filter.'
            example: '00821780058739'
            nullable: false
        -
          in: query
          name: partIds
          description: 'Optional. Comma-separated PartIds to filter.'
          example: CP0000009494
          required: false
          schema:
            type: string
            description: 'Optional. Comma-separated PartIds to filter.'
            example: CP0000009494
            nullable: false
        -
          in: query
          name: skus
          description: 'Optional. Comma-separated SKUs to filter.'
          example: 'G500,G800'
          required: false
          schema:
            type: string
            description: 'Optional. Comma-separated SKUs to filter.'
            example: 'G500,G800'
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      sku: G500
                      partId: CP0000009494
                      gtin: '00821780058739'
                      caseQty: 72
                      color: 'Dark Chocolate'
                      size: 2XL
                      price: '3.85'
                      qty: 10330
                      qtyLocation:
                        -
                          warehouseId: CP
                          warehouseName: 'Fort Lauderdale, FL'
                          quantity: 689
                        -
                          warehouseId: SAN
                          warehouseName: 'San Antonio, TX'
                          quantity: 331
                  pagination:
                    page: 1
                    limit: 500
                    total_records: 689
                    next_page: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        sku: G500
                        partId: CP0000009494
                        gtin: '00821780058739'
                        caseQty: 72
                        color: 'Dark Chocolate'
                        size: 2XL
                        price: '3.85'
                        qty: 10330
                        qtyLocation:
                          -
                            warehouseId: CP
                            warehouseName: 'Fort Lauderdale, FL'
                            quantity: 689
                          -
                            warehouseId: SAN
                            warehouseName: 'San Antonio, TX'
                            quantity: 331
                    items:
                      type: object
                      properties:
                        sku:
                          type: string
                          example: G500
                        partId:
                          type: string
                          example: CP0000009494
                        gtin:
                          type: string
                          example: '00821780058739'
                        caseQty:
                          type: integer
                          example: 72
                        color:
                          type: string
                          example: 'Dark Chocolate'
                        size:
                          type: string
                          example: 2XL
                        price:
                          type: string
                          example: '3.85'
                        qty:
                          type: integer
                          example: 10330
                        qtyLocation:
                          type: array
                          example:
                            -
                              warehouseId: CP
                              warehouseName: 'Fort Lauderdale, FL'
                              quantity: 689
                            -
                              warehouseId: SAN
                              warehouseName: 'San Antonio, TX'
                              quantity: 331
                          items:
                            type: object
                            properties:
                              warehouseId:
                                type: string
                                example: CP
                              warehouseName:
                                type: string
                                example: 'Fort Lauderdale, FL'
                              quantity:
                                type: integer
                                example: 689
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        example: 1
                      limit:
                        type: integer
                        example: 500
                      total_records:
                        type: integer
                        example: 689
                      next_page:
                        type: integer
                        example: 2
      tags:
        - Products
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                fields:
                  type: string
                  description: ''
                  example: illum
                  nullable: false
                gtins:
                  type: string
                  description: 'Must match the regex /^[0-9,]+$/.'
                  example: '01'
                  nullable: false
                partIds:
                  type: string
                  description: ''
                  example: quia
                  nullable: false
                skus:
                  type: string
                  description: ''
                  example: illo
                  nullable: false
                page:
                  type: integer
                  description: 'Must be at least 1.'
                  example: 56
                  nullable: false
tags:
  -
    name: Authentication
    description: ''
  -
    name: Orders
    description: 'This endpoint list of active styles that will need to get the product information.'
  -
    name: Products
    description: 'This endpoint list of active styles that will need to get the product information.'
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.'
security:
  -
    default: []
