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

# Retrieve orders

> Retrieve all orders of products from shop. <h3>OAuth</h3>Required scopes: <code>shop.readonly</code> or <code>shop</code>



## OpenAPI

````yaml /assets/openapi.json get /shop/orders/v1
openapi: 3.0.2
info:
  title: Spacebring
  version: 1.0.0
  termsOfService: https://www.spacebring.com/terms
servers:
  - url: https://api.spacebring.com
security: []
paths:
  /shop/orders/v1:
    get:
      tags:
        - Shop
      summary: Retrieve orders
      description: >-
        Retrieve all orders of products from shop. <h3>OAuth</h3>Required
        scopes: <code>shop.readonly</code> or <code>shop</code>
      operationId: getOrders
      parameters:
        - name: locationRef
          in: query
          description: The id of the location.
          schema:
            type: string
            format: uuid
          required: true
        - in: query
          name: status
          description: The status of the order.
          schema:
            type: string
            enum:
              - new
              - inProgress
              - completed
              - canceled
          required: false
        - in: query
          name: createDate
          description: The date filter of items.
          schema:
            type: object
            properties:
              lte:
                format: date-time
                type: string
                description: >-
                  Get orders with less createDate. Example:
                  createDate[lte]=2021-05-21T10:00:00Z
              gte:
                format: date-time
                type: string
                description: >-
                  Get orders with greater createDate. Example:
                  createDate[gte]=2021-05-21T10:00:00Z
        - in: query
          name: limit
          schema:
            type: integer
            format: int64
            minimum: 1
            maximum: 100
            default: 25
          description: The number of items to return
        - in: query
          name: nextPageToken
          schema:
            $ref: '#/components/schemas/nextPageToken'
          description: Token to retrieve the next page of results.
        - in: header
          name: spacebring-network-id
          schema:
            type: string
            format: uuid
          required: false
          description: >-
            The id of the network. Required when using bearer token
            authentication
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/order'
                  nextPageToken:
                    $ref: '#/components/schemas/nextPageToken'
                  searchQueryNext:
                    $ref: '#/components/schemas/searchQueryNext'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responseError'
      security:
        - BasicAuth: []
        - OAuth2:
            - shop.readonly
            - shop
components:
  schemas:
    nextPageToken:
      type: string
      description: >-
        Opaque cursor token for retrieving the next page of results. Pass this
        value as the `nextPageToken` query parameter in your next request.
    order:
      type: object
      properties:
        comment:
          description: Optional comment left by the customer.
          type: string
        createDate:
          description: ISO timestamp of when the order was created.
          type: string
          format: date-time
        deleteDate:
          description: ISO timestamp of when the order was deleted.
          type: string
          format: date-time
        id:
          description: Unique identifier of the order.
          type: string
          format: uuid
        items:
          description: Items included in this order.
          type: array
          items:
            type: object
            properties:
              altCurrencyPriceDetails:
                description: Price in an alternative currency, if applicable.
                type: object
                properties:
                  money:
                    type: object
                    properties:
                      currencyCode:
                        description: ISO 4217 currency code.
                        type: string
                      tax:
                        description: Tax details.
                        type: object
                        properties:
                          inclusive:
                            description: Whether tax is included in the price.
                            type: boolean
                          rate:
                            description: Tax rate.
                            type: number
                        required:
                          - inclusive
                          - rate
                        additionalProperties: false
                      unitAmount:
                        description: Unit price in the alternative currency.
                        type: number
                    required:
                      - currencyCode
                      - unitAmount
                    additionalProperties: false
                  type:
                    description: Price type.
                    type: string
                    enum:
                      - money
                required:
                  - money
                  - type
                additionalProperties: false
              id:
                description: Unique identifier of the order item.
                type: string
                format: uuid
              priceDetails:
                description: Price details for this item, if the order was paid.
                type: object
                properties:
                  credits:
                    description: Credits price details.
                    type: object
                    properties:
                      unitAmount:
                        description: Unit price in credits.
                        type: number
                    required:
                      - unitAmount
                    additionalProperties: false
                  money:
                    description: Money price details.
                    type: object
                    properties:
                      currencyCode:
                        description: ISO 4217 currency code.
                        type: string
                      tax:
                        description: Tax details.
                        type: object
                        properties:
                          inclusive:
                            description: Whether tax is included in the price.
                            type: boolean
                          rate:
                            description: Tax rate.
                            type: number
                        required:
                          - inclusive
                          - rate
                        additionalProperties: false
                      unitAmount:
                        description: Unit price in money.
                        type: number
                    required:
                      - currencyCode
                      - unitAmount
                    additionalProperties: false
                  type:
                    description: Price type.
                    type: string
                    enum:
                      - credits
                      - money
                required:
                  - type
                additionalProperties: false
              product:
                description: Product purchased in this item.
                type: object
                properties:
                  description:
                    description: Product description.
                    type: string
                  id:
                    description: Unique identifier of the product.
                    type: string
                    format: uuid
                  media:
                    description: Product media files.
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          description: Storage key.
                          type: string
                        url:
                          description: Public URL.
                          type: string
                      required:
                        - key
                        - url
                      additionalProperties: false
                  option:
                    description: Product option selected for this item.
                    type: object
                    properties:
                      id:
                        description: Unique identifier of the option.
                        type: string
                        format: uuid
                      title:
                        description: Display name of the option.
                        type: string
                    required:
                      - id
                      - title
                    additionalProperties: false
                  title:
                    description: Product title.
                    type: string
                required:
                  - description
                  - id
                  - media
                  - title
                additionalProperties: false
              quantity:
                description: Number of units purchased.
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
            required:
              - id
              - product
              - quantity
            additionalProperties: false
        locationRef:
          description: ID of the location where the order was placed.
          type: string
          format: uuid
        membershipRef:
          description: ID of the membership associated with this order.
          type: string
          format: uuid
        membershipRefDeletedBy:
          description: ID of the membership that deleted this order.
          type: string
          format: uuid
        number:
          description: Sequential order number within the location.
          type: number
        payment:
          description: Payment details. Absent for free orders.
          type: object
          properties:
            createDate:
              description: ISO timestamp of when the payment was created.
              type: string
              format: date-time
            discounts:
              description: Discounts applied to this order.
              type: array
              items:
                type: object
                properties:
                  coupon:
                    description: Applied coupon details.
                    type: object
                    properties:
                      amountOff:
                        description: Fixed amount deducted by this coupon.
                        type: number
                      currencyCode:
                        description: ISO 4217 currency code for the coupon amount.
                        type: string
                      id:
                        description: Coupon identifier.
                        type: string
                      percentOff:
                        description: Percentage deducted by this coupon.
                        type: number
                      productTypes:
                        description: Product types this coupon applies to.
                        type: array
                        items:
                          type: string
                      type:
                        description: Coupon type.
                        type: string
                    additionalProperties: false
                  promocode:
                    description: Applied promocode details.
                    type: object
                    properties:
                      code:
                        description: Promocode string.
                        type: string
                      expiration:
                        description: ISO timestamp of when the promocode expires.
                        type: object
                        properties:
                          date:
                            type: string
                          enabled:
                            type: boolean
                        required:
                          - enabled
                        additionalProperties: false
                      id:
                        description: Promocode identifier.
                        type: string
                      limitByFirstPurchase:
                        description: >-
                          Whether the promocode is limited to the first
                          purchase.
                        type: boolean
                    required:
                      - code
                      - id
                    additionalProperties: false
                  subscriptionId:
                    description: Subscription reference associated with this discount.
                    type: string
                required:
                  - coupon
                additionalProperties: false
            dispute:
              description: Payment dispute details, if any.
              type: object
              properties:
                createDate:
                  description: ISO timestamp of when the dispute was created.
                  type: string
                  format: date-time
              required:
                - createDate
              additionalProperties: false
            method:
              description: Payment method used for this order.
              type: object
              properties:
                credits:
                  description: Credits payment method details.
                  type: object
                  properties:
                    customer:
                      description: Customer who paid with credits.
                      type: object
                      properties:
                        id:
                          description: Customer identifier.
                          type: string
                        location:
                          description: Location the customer belongs to.
                          type: object
                          properties:
                            id:
                              description: Unique identifier of the location.
                              type: string
                              format: uuid
                            title:
                              description: Display name of the location.
                              type: string
                          required:
                            - id
                            - title
                          additionalProperties: false
                        name:
                          description: First name of the customer.
                          type: string
                        surname:
                          description: Last name of the customer.
                          type: string
                        title:
                          description: Company title.
                          type: string
                        type:
                          description: Customer type.
                          type: string
                          enum:
                            - company
                            - membership
                      additionalProperties: false
                  required:
                    - customer
                  additionalProperties: false
                invoice:
                  description: Invoice payment method details.
                  type: object
                  properties:
                    customer:
                      description: Customer who paid by invoice.
                      type: object
                      properties:
                        id:
                          description: Customer identifier.
                          type: string
                        location:
                          description: Location the customer belongs to.
                          type: object
                          properties:
                            id:
                              description: Unique identifier of the location.
                              type: string
                              format: uuid
                            title:
                              description: Display name of the location.
                              type: string
                          required:
                            - id
                            - title
                          additionalProperties: false
                        name:
                          description: First name of the customer.
                          type: string
                        surname:
                          description: Last name of the customer.
                          type: string
                        title:
                          description: Company title.
                          type: string
                        type:
                          description: Customer type.
                          type: string
                          enum:
                            - company
                            - membership
                      additionalProperties: false
                    invoiceRef:
                      description: Reference to the invoice.
                      type: string
                      format: uuid
                    subscriptionRef:
                      description: Reference to the subscription.
                      type: string
                      format: uuid
                  required:
                    - customer
                  additionalProperties: false
                paymentGateway:
                  description: Payment gateway method details.
                  type: object
                  properties:
                    customer:
                      description: Customer who paid via payment gateway.
                      type: object
                      properties:
                        id:
                          description: Customer identifier.
                          type: string
                        location:
                          description: Location the customer belongs to.
                          type: object
                          properties:
                            id:
                              description: Unique identifier of the location.
                              type: string
                              format: uuid
                            title:
                              description: Display name of the location.
                              type: string
                          required:
                            - id
                            - title
                          additionalProperties: false
                        name:
                          description: First name of the customer.
                          type: string
                        surname:
                          description: Last name of the customer.
                          type: string
                        title:
                          description: Company title.
                          type: string
                        type:
                          description: Customer type.
                          type: string
                          enum:
                            - company
                            - membership
                      additionalProperties: false
                    label:
                      description: >-
                        Human-readable payment method label (e.g. Visa ****
                        4242).
                      type: string
                    location:
                      description: Location associated with the payment gateway.
                      type: object
                      properties:
                        id:
                          description: Unique identifier of the location.
                          type: string
                          format: uuid
                        title:
                          description: Display name of the location.
                          type: string
                      required:
                        - id
                        - title
                      additionalProperties: false
                    mask:
                      description: Masked payment method identifier.
                      type: string
                    title:
                      description: Payment gateway display name.
                      type: string
                    type:
                      description: Payment gateway type.
                      type: string
                      enum:
                        - flow
                        - fondy
                        - freedompay
                        - kakaopay
                        - maya
                        - mercadopago
                        - paypal
                        - paystack
                        - plata
                        - stripe
                        - tap
                        - wayforpay
                        - mollie
                  required:
                    - customer
                  additionalProperties: false
                type:
                  description: Payment method type.
                  type: string
                  enum:
                    - credits
                    - invoice
                    - paymentGateway
              required:
                - type
              additionalProperties: false
            price:
              description: Price breakdown for this payment.
              type: object
              properties:
                credits:
                  description: Credits price breakdown. Present when type is credits.
                  type: object
                  properties:
                    expiringAmount:
                      description: Amount of expiring credits charged.
                      type: number
                    permanentAmount:
                      description: Amount of permanent credits charged.
                      type: number
                  required:
                    - expiringAmount
                    - permanentAmount
                  additionalProperties: false
                money:
                  description: Money price breakdown. Present when type is money.
                  type: object
                  properties:
                    currencyCode:
                      description: ISO 4217 currency code.
                      type: string
                    grossAmount:
                      description: Total gross amount charged.
                      type: number
                  required:
                    - currencyCode
                    - grossAmount
                  additionalProperties: false
                type:
                  description: Payment price type.
                  type: string
                  enum:
                    - credits
                    - money
              required:
                - type
              additionalProperties: false
            refund:
              description: Most recent refund, if any.
              type: object
              properties:
                credits:
                  description: Credits refund details.
                  type: object
                  properties:
                    amountExpiring:
                      description: Expiring credits refunded.
                      type: number
                    amountPermanent:
                      description: Permanent credits refunded.
                      type: number
                    amountTotal:
                      description: Total credits refunded.
                      type: number
                    createDate:
                      description: ISO timestamp of when the refund was created.
                      type: string
                      format: date-time
                  required:
                    - amountExpiring
                    - amountPermanent
                    - amountTotal
                    - createDate
                  additionalProperties: false
                money:
                  description: Money refund details.
                  type: object
                  properties:
                    createDate:
                      description: ISO timestamp of when the refund was created.
                      type: string
                      format: date-time
                    currencyCode:
                      description: ISO 4217 currency code.
                      type: string
                    grossAmount:
                      description: Gross amount refunded.
                      type: number
                  required:
                    - createDate
                    - currencyCode
                    - grossAmount
                  additionalProperties: false
                transactionRef:
                  description: Reference to the refund transaction.
                  type: string
              additionalProperties: false
            refundable:
              description: Whether this payment can currently be refunded.
              type: boolean
            refunds:
              description: All refunds for this payment.
              type: object
              properties:
                credits:
                  description: List of credits refunds.
                  type: array
                  items:
                    type: object
                    properties:
                      amountExpiring:
                        description: Expiring credits in this refund.
                        type: number
                      amountPermanent:
                        description: Permanent credits in this refund.
                        type: number
                      amountTotal:
                        description: Total credits in this refund.
                        type: number
                      createDate:
                        description: ISO timestamp of when this refund was created.
                        type: string
                        format: date-time
                      id:
                        description: Refund identifier.
                        type: string
                    required:
                      - amountExpiring
                      - amountPermanent
                      - amountTotal
                      - createDate
                      - id
                    additionalProperties: false
                money:
                  description: List of money refunds.
                  type: array
                  items:
                    type: object
                    properties:
                      createDate:
                        description: ISO timestamp of when this refund was created.
                        type: string
                        format: date-time
                      currencyCode:
                        description: ISO 4217 currency code.
                        type: string
                      grossAmount:
                        description: Gross amount of this refund.
                        type: number
                      id:
                        description: Refund identifier.
                        type: string
                    required:
                      - createDate
                      - currencyCode
                      - grossAmount
                      - id
                    additionalProperties: false
                type:
                  description: Refund type.
                  type: string
                  enum:
                    - credits
                    - money
              additionalProperties: false
            request:
              description: >-
                Pending payment request. Present when status is pending and the
                order belongs to the current user.
              type: object
              properties:
                id:
                  description: Payment request identifier.
                  type: string
                  format: uuid
                url:
                  description: URL to complete the payment.
                  type: string
              required:
                - id
                - url
              additionalProperties: false
            status:
              description: Payment status (e.g. succeeded, pending, failed).
              type: string
            surcharge:
              description: Payment gateway surcharge, if any.
              type: object
              properties:
                money:
                  type: object
                  properties:
                    amount:
                      description: Surcharge amount.
                      type: number
                    currencyCode:
                      description: ISO 4217 currency code.
                      type: string
                    percentage:
                      description: Surcharge percentage.
                      type: number
                    rate:
                      description: Surcharge rate.
                      type: number
                  required:
                    - amount
                    - currencyCode
                    - percentage
                    - rate
                  additionalProperties: false
                type:
                  description: Surcharge type.
                  type: string
                  enum:
                    - money
              required:
                - money
                - type
              additionalProperties: false
            transactionRef:
              description: Reference to the payment transaction.
              type: string
            type:
              description: Payment type (e.g. stripe, credits, invoice).
              type: string
          required:
            - discounts
            - method
            - price
            - refundable
          additionalProperties: false
        status:
          description: Current order status.
          type: string
          enum:
            - new
            - inProgress
            - completed
            - canceled
        user:
          description: User who placed the order.
          type: object
          properties:
            about:
              description: Short bio of the user.
              nullable: true
              type: string
            email:
              description: Email address of the user.
              nullable: true
              type: string
            id:
              description: Unique identifier of the user.
              type: string
              format: uuid
            name:
              description: First name of the user.
              nullable: true
              type: string
            phoneNumber:
              description: Phone number of the user.
              nullable: true
              type: string
            photoUrl:
              description: Profile photo URL of the user.
              nullable: true
              type: string
            surname:
              description: Last name of the user.
              nullable: true
              type: string
          required:
            - id
          additionalProperties: false
        userDeletedBy:
          description: User who deleted this order, if applicable.
          type: object
          properties:
            id:
              description: Unique identifier of the user who deleted the order.
              type: string
              format: uuid
            name:
              description: First name of the user who deleted the order.
              type: string
            surname:
              description: Last name of the user who deleted the order.
              type: string
          required:
            - id
            - name
            - surname
          additionalProperties: false
      required:
        - createDate
        - id
        - items
        - locationRef
        - number
        - status
        - user
      additionalProperties: false
    searchQueryNext:
      type: string
      description: >-
        Pre-built query string for the next page of results. Contains all active
        filter parameters combined with the next page token, ready to append to
        the endpoint URL.
    responseError:
      type: object
      properties:
        message:
          type: string
        type:
          type: string
  securitySchemes:
    BasicAuth:
      type: http
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#basic-authentication)
        for how to authorize your requests
      scheme: basic
    OAuth2:
      type: oauth2
      description: >-
        See our [authentication
        documentation](https://www.spacebring.com/docs/api-reference/authentication#oauth2)
        for how to authorize your requests
      flows:
        authorizationCode:
          authorizationUrl: https://api.spacebring.com/oauth2/authorize
          tokenUrl: https://api.spacebring.com/oauth2/token
          refreshUrl: https://api.spacebring.com/oauth2/token
          scopes:
            benefits.readonly: Read benefits and applications
            benefits: Read and write benefits and applications
            community.readonly: Read community companies and memberships
            community: Read and write community companies and memberships
            events.readonly: Read events and tickets
            events: Read and write events and tickets
            feed.readonly: Read feed posts
            feed: Read and write feed posts
            invoices.readonly: Read invoices
            invoices: Read and write invoices
            locations.readonly: Read locations
            locations: Read and write locations
            plans.readonly: Read plans
            plans: Read and write plans
            resources.readonly: Read resources and bookings
            resources: Read and write resources and bookings
            subscriptions.readonly: Read subscriptions
            subscriptions: Read and write subscriptions
            shop.readonly: Read products and orders
            shop: Read and write products and orders
            support.readonly: Read support tickets
            support: Read and write support tickets
            transactions.readonly: Read transactions
            transactions: Read and write transactions
            visitors.readonly: Read visitors
            visitors: Read and write visitors

````