# Get order

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/order:
    get:
      summary: Get order
      deprecated: false
      description: ''
      tags:
        - Integration via the Globkurier API/Endpoints/Orders
      parameters:
        - name: number
          in: query
          description: Order number (Requires login. Used interchangeably with "hash").
          required: true
          example: GK161014996110
          schema:
            type: string
        - name: hash
          in: query
          description: Order Hash (No login required. Interchangeable with "number").
          required: true
          example: 6e76c6c8b2227ea1683dcea2f2d36cc0d115cc108f5581186ef4e3ead76b15b3
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: ''
          required: false
          example: pl
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            Authorization token from Generate token. Optional. If omitted, the
            order is placed as an anonymous user (userAddress required). An
            invalid or expired token returns 401 – the request is not downgraded
            to anonymous.
          required: false
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  number:
                    type: string
                  creationDate:
                    type: string
                  status:
                    type: string
                    description: >-
                      Current order status. After DELETE /v1/order:
                      AWAITING_CARRIER_CANCELLATION = cancellation requested
                      from the carrier, not final yet (pickup may still happen);
                      CANCELED = cancellation final, refund issued.
                  purpose:
                    type: string
                  content:
                    type: string
                  instructions:
                    type: string
                  trackingNumber:
                    type: string
                  deliveryDate:
                    type: string
                  hasCarrierError:
                    type: boolean
                  paymentId:
                    type: integer
                  originId:
                    type: integer
                    description: Order source ID
                  discountCode:
                    type: string
                  declaredValue:
                    type: number
                  pricing:
                    type: array
                    items:
                      type: object
                      properties:
                        priceGross:
                          type: number
                        priceNet:
                          type: number
                        vatPercent:
                          type: integer
                        currency:
                          type: string
                      x-apidog-orders:
                        - priceGross
                        - priceNet
                        - vatPercent
                        - currency
                  senderAddress:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                  receiverAddress:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                  userAddress:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                  shipment:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                  addons:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                  pickup:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                        timeFrom:
                          type: string
                        timeTo:
                          type: string
                      x-apidog-orders:
                        - date
                        - timeFrom
                        - timeTo
                  financialDocuments:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                  transportDocuments:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                  hash:
                    type: string
                  referenceNumber:
                    type: string
                  links:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                  identifiers:
                    type: array
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                x-apidog-orders:
                  - number
                  - creationDate
                  - status
                  - purpose
                  - content
                  - instructions
                  - trackingNumber
                  - deliveryDate
                  - hasCarrierError
                  - paymentId
                  - originId
                  - discountCode
                  - declaredValue
                  - pricing
                  - senderAddress
                  - receiverAddress
                  - userAddress
                  - shipment
                  - addons
                  - pickup
                  - financialDocuments
                  - transportDocuments
                  - hash
                  - referenceNumber
                  - links
                  - identifiers
              example: "{\r\n    \"purpose\": null,\r\n    \"number\": \"GK160705888685\",\r\n    \"creationDate\": \"2016-07-05 11:37:00\",\r\n    \"status\": \"CANCELED\",\r\n    \"pricing\": {\r\n        \"priceGross\": 231.49,\r\n        \"priceNet\": 188.2,\r\n        \"vatPercent\": 23,\r\n        \"currency\": \"PLN\"\r\n    },\r\n    \"senderAddress\": {\r\n        \"name\": \"Imię\",\r\n        \"surname\": \"Nazwisko\",\r\n        \"street\": \"Testowa\",\r\n        \"apartmentNumber\": \"2\",\r\n        \"houseNumber\": \"1\",\r\n        \"city\": \"Częstochowa\",\r\n        \"postCode\": \"42-226\",\r\n        \"countryId\": 1,\r\n        \"phone\": \"+48512345678\",\r\n        \"email\": \"test@testmail.pl\",\r\n        \"contactPerson\": \"Osoba kontaktowa\",\r\n        \"pointId\": null,\r\n        \"stateId\": null\r\n    },\r\n    \"receiverAddress\": {\r\n        \"name\": \"Imię\",\r\n        \"surname\": \"Nazwisko\",\r\n        \"street\": \"Inna\",\r\n        \"apartmentNumber\": \"3D\",\r\n        \"houseNumber\": \"1\",\r\n        \"city\": \"Częstochowa\",\r\n        \"postCode\": \"42-226\",\r\n        \"countryId\": 1,\r\n        \"phone\": \"+48512345678\",\r\n        \"email\": \"test2@testmail.pl\",\r\n        \"contactPerson\": \"Inna osoba kontaktowa\",\r\n        \"pointId\": null,\r\n        \"stateId\": null\r\n    },\r\n    \"userAddress\": {\r\n        \"regon\": null,\r\n        \"nip\": null,\r\n        \"name\": \"Imię klienta\",\r\n        \"surname\": \"Nazwisko\",\r\n        \"street\": \"Testowa\",\r\n        \"apartmentNumber\": \"Test2\",\r\n        \"houseNumber\": \"Test1\",\r\n        \"city\": \"Katowice\",\r\n        \"postCode\": \"42-226\",\r\n        \"countryId\": 1,\r\n        \"phone\": \"+48512345678\",\r\n        \"email\": \"test3@testmail.pl\",\r\n        \"companyName\": \"\",\r\n        \"type\": \"PERSON\"\r\n    },\r\n    \"shipment\": {\r\n        \"productId\": 683,\r\n        \"name\": \"TEST With addons\"\r\n        \"length\": 1,\r\n        \"width\": 1,\r\n        \"height\": 1,\r\n        \"weight\": 1,\r\n        \"quantity\": 1,\r\n        \"carrier\": {\r\n            \"id\": 91,\r\n            \"name\": \"TEST With addons\",\r\n            \"logo\": \"https://.../91.png\"\r\n        }\r\n    },\r\n    \"content\": \"Części samochodowe\",\r\n    \"instructions\": \"\",\r\n    \"paymentId\": 6,\r\n    \"originId\": 24,\r\n    \"discountCode\": null,\r\n    \"declaredValue\": null,\r\n    \"pickup\": {\r\n        \"date\": \"2016-07-05\",\r\n        \"timeFrom\": \"08:00:00\",\r\n        \"timeTo\": \"18:00:00\"\r\n    },\r\n    \"addons\": [\r\n        {\r\n            \"category\": \"NOT_STANDARD\",\r\n            \"addonName\": \"Opłata za element niestandardowy do 30kg\",\r\n            \"id\": 340,\r\n            \"price\": 10,\r\n            \"currency\": \"PLN\"\r\n        },\r\n        {\r\n            \"value\": 243.49,\r\n            \"valueCurrency\": \"PLN\",\r\n            \"bankAccountNumber\": \"PL15175000120000000032303161\",\r\n            \"name\": \"Test\",\r\n            \"addressLine1\": \"address line 1\",\r\n            \"addressLine2\": \"address line 2\",\r\n            \"status\": {\r\n                \"name\": \"WAITING_FOR_DELIVERY\",\r\n                \"description\": \"Parcel is waiting for delivery\",\r\n                \"returnDate\": null\r\n            },\r\n            \"category\": \"CASH_ON_DELIVERY\",\r\n            \"addonName\": \"COD do 5000zł\",\r\n            \"id\": 342,\r\n            \"price\": 3.5,\r\n            \"currency\": \"PLN\"\r\n        },\r\n        {\r\n            \"value\": 321,\r\n            \"category\": \"INSURANCE\",\r\n            \"addonName\": \"Ubezpieczenie do 5000zł\",\r\n            \"id\": 348,\r\n            \"price\": 1.5,\r\n            \"currency\": \"PLN\"\r\n        },\r\n        {\r\n            \"addonName\": \"Adres zwrotu przesyłki\",\r\n            \"name\": \"Imię\",\r\n            \"surname\": \"Nazwisko\",\r\n            \"city\": \"Miasto\",\r\n            \"street\": \"Ulica\",\r\n            \"houseNumber\": \"2\",\r\n            \"apartmentNumber\": \"1\",\r\n            \"postCode\": \"41-100\",\r\n            \"phone\": \"132123123\",\r\n            \"email\": null,\r\n            \"countryId\": 1,\r\n            \"category\": \"RETURN_SHIPMENT_ADDRESS\",\r\n            \"id\": 350,\r\n            \"price\": 2.5,\r\n            \"currency\": \"PLN\"\r\n        }\r\n    ],\r\n    \"financialDocuments\": [\r\n        {\r\n            \"type\": \"INVOICE\",\r\n            \"link\": \"https://api.globkurier.pl/v1/invoice?hash=104745b285bedbb667c59b135d9b9a74770af9b0\",\r\n            \"name\": \"Faktura VAT\"\r\n        }\r\n    ],\r\n    \"transportDocuments\": [\r\n        {\r\n            \"type\": \"WAYBILL\",\r\n            \"link\": \"https://api.globkurier.pl/v1/order/labels?orderHashes[0]=dz2745b285bedbb667c59b135d9b9a74770af9b0104745b285bedbb667c59b1a\",\r\n            \"name\": \"List przewozowy\",\r\n            \"downloaded\": \"2016-07-05 13:45:00\"\r\n        },\r\n        {\r\n            \"type\": \"PROTOCOL\",\r\n            \"link\": \"https://api.globkurier.pl/v1/order/protocol?orderHashes[0]=dz2745b285bedbb667c59b135d9b9a74770af9b0104745b285bedbb667c59b1a\",\r\n            \"name\": \"Protokół przekazania towaru\",\r\n            \"downloaded\": null\r\n        }\r\n    ],\r\n    \"links\": [\r\n        {\r\n            \"href\": \"/order/status/cancel\",\r\n            \"title\": \"Cancel an order\",\r\n            \"type\": \"PUT\"\r\n        }\r\n    ],\r\n    \"hash\": \"dz2745b285bedbb667c59b135d9b9a74770af9b0104745b285bedbb667c59b1a\"\r\n}"
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: Integration via the Globkurier API/Endpoints/Orders
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/844225/apis/api-17377900-run
components:
  schemas: {}
  securitySchemes:
    tokenAuth:
      type: apikey
      in: header
      name: X-Auth-Token
servers:
  - url: https://test.api.globkurier.pl
    description: Testing Env
  - url: https://api.globkurier.pl
    description: Prod Env
security: []

```
