---
title: Strings vs Integers
description: Doshii uses Strings over Integers when available It's a fine balance between stability and flexibility. As such, there are some fields where Integers and Strings are both accepted as valid for a numbe
---

[Skip to content](https://support.doshii.com/developer-support/hc/en-us/articles/360000649453-strings-vs-integers#main-content)

English

Show submenu for translations

Doshii Connect Pty Ltd

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- Go to Doshii Connect Pty Ltd

 Go to Doshii Connect Pty Ltd

 Help for Partners

- There are no suggestions because the search field is empty.

1. [Help for Partners](https://support.doshii.com/developer-support?hsLang=en)
2. [API concepts](https://support.doshii.com/developer-support/api-concepts?hsLang=en)

# Strings vs Integers

**Doshii uses Strings over Integers when available**

It's a fine balance between stability and flexibility. As such, there are some fields where Integers and Strings are both accepted as valid for a number.

Flexibility is good, right?

It is, if you're aware of the gotchas involved in this method of accepting data.

Let's look at a common example of the Partner endpoint [`POST /orders`](https://support.doshii.io/hc/en-us/articles/115004491133). Specifically the `order.items` property.

The first object in the array contains a property called `quantity`. This is a field that accepts either a String or an Integer.

Here's a sample body.

```
{
    "consumer": {
        "name": "Tony T",
        "phone": "01234567890"
    },
    "order": {
        "type": "pickup",
        "surcounts": [],
        "items": [
            {
                "name": "Toasted Sourdough Bread & Eggs",
                "description": "Just ye old classic",
                "unitPrice": "1100",
                "totalBeforeSurcounts": "1100",
                "totalAfterSurcounts": "1100",
                "posId": "toasted_eggs",
                "quantity": 1, // <=========
                "surcounts": [],
                "options": []
            }
        ]
    }
}
```

*This all seems fine, why are we talking about this?*

Ah, well, this is where the catch resides. If you send us an Integer, the API will send you back an integer.

Here's the order you just sent up from [`GET /orders/:id`](http://docs.doshii.co/api/v3/partner/#api-Orders-GetOrder)

 

```

{
  "id": "16",
  "phase": null,
  "notes": null,
  "requiredAt": null,
  "status": "pending",
  "type": "pickup",
  "checkinId": null,
  "locationId": "MV8YOY6w",
  "items": [
    {
      "name": "Toasted Sourdough Bread & Eggs",
      "posId": "toasted_eggs",
      "options": [],
      "quantity": 1, // <======= Hi, I'm an Integer
      "surcounts": [],
      "unitPrice": "1100",
      "description": "Just ye old classic",
      "totalAfterSurcounts": "1100",
      "totalBeforeSurcounts": "1100"
    }
  ],
  "surcounts": [],
  "consumer": {
    "name": "Tony T",
    "phone": "01234567890"
  },
  "updatedAt": "2017-01-04T04:03:18.068Z",
  "transactions": [],
  "version": "gAjPndlnXaSdePpqALeJCgBYzjyKKvHP0RRrjjKw",
  "uri": "http://localhost:2001/partner/v3/orders/16"
}
```

*Still seems fine, why are we still talking about this?*

Because inversely, if you send us `quantity` as a String, we'll also respond to you with a String.

What we're trying to say here is that if you send a type, expect the same type back for these fields.

All in all, we'd prefer if you send these fields that accept either Strings or Integers, as **Strings**. The fields themselves are marked in the API Reference.

This only affects Partner Applications.

  

- [API concepts](https://support.doshii.com/developer-support/api-concepts?hsLang=en)
- [Members](https://support.doshii.com/developer-support/members?hsLang=en)
- [Model](https://support.doshii.com/developer-support/model?hsLang=en)
- [FAQ - Developers](https://support.doshii.com/developer-support/faq-developers?hsLang=en)
- [Resources](https://support.doshii.com/developer-support/resources?hsLang=en)
- [Orders](https://support.doshii.com/developer-support/orders?hsLang=en)
- [Rewards](https://support.doshii.com/developer-support/rewards?hsLang=en)
- [Check-ins](https://support.doshii.com/developer-support/check-ins?hsLang=en)
- [Getting started - App partners](https://support.doshii.com/developer-support/getting-started-app-partners?hsLang=en)
- [Employees](https://support.doshii.com/developer-support/employees?hsLang=en)
- [Getting started - Doshii Dashboard](https://support.doshii.com/developer-support/getting-started-doshii-dashboard?hsLang=en)
- [Quick start for developers](https://support.doshii.com/developer-support/quick-start-for-developers?hsLang=en)
- [Onboarding](https://support.doshii.com/developer-support/onboarding?hsLang=en)
- [Location](https://support.doshii.com/developer-support/location?hsLang=en)
- [All App Partners Event](https://support.doshii.com/developer-support/all-app-partners-event?hsLang=en)
- [Menus](https://support.doshii.com/developer-support/menus?hsLang=en)
- [Loyalty / Checkins](https://support.doshii.com/developer-support/loyalty-checkins?hsLang=en)
- [WebSocket - App partners](https://support.doshii.com/developer-support/websocket-app-partners?hsLang=en)
- [All POS vendor events](https://support.doshii.com/developer-support/all-pos-vendor-events?hsLang=en)
- [Loyalty / Gift Cards](https://support.doshii.com/developer-support/loyalty-gift-cards?hsLang=en)
- [Devices](https://support.doshii.com/developer-support/devices?hsLang=en)
- [Tables](https://support.doshii.com/developer-support/tables?hsLang=en)
- [Workflows](https://support.doshii.com/developer-support/workflows?hsLang=en)
- [FAQ - Doshii Dashboard](https://support.doshii.com/developer-support/faq-doshii-dashboard?hsLang=en)
- [Bookings](https://support.doshii.com/developer-support/bookings?hsLang=en)
- [Transactions](https://support.doshii.com/developer-support/transactions?hsLang=en)
- [Webhooks](https://support.doshii.com/developer-support/webhooks?hsLang=en#main-content)

    - [App Partners](https://support.doshii.com/developer-support/webhooks?hsLang=en#app-partners)
    - [POS Vendors](https://support.doshii.com/developer-support/webhooks?hsLang=en#pos-vendors)
- [App Partner Guide](https://support.doshii.com/developer-support/app-partner-guide?hsLang=en)
- [Authentication](https://support.doshii.com/developer-support/authentication?hsLang=en)
- [Getting started - POS vendors](https://support.doshii.com/developer-support/getting-started-pos-vendors?hsLang=en)
- [Ordering](https://support.doshii.com/developer-support/ordering?hsLang=en)
- [Reservations](https://support.doshii.com/developer-support/reservations?hsLang=en)
- [Pilot](https://support.doshii.com/developer-support/pilot?hsLang=en)
- [Bulk data](https://support.doshii.com/developer-support/bulk-data?hsLang=en)
- [Playbooks](https://support.doshii.com/developer-support/playbooks?hsLang=en)
- [Rejection codes](https://support.doshii.com/developer-support/rejection-codes?hsLang=en)
- [Getting started](https://support.doshii.com/developer-support/getting-started?hsLang=en)
- [WebSocket - POS partners](https://support.doshii.com/developer-support/websocket-pos-partners?hsLang=en)
- [Events - App partners](https://support.doshii.com/developer-support/events-app-partners?hsLang=en)
- [Service channels](https://support.doshii.com/developer-support/service-channels?hsLang=en)
- [Events](https://support.doshii.com/developer-support/events?hsLang=en)
- [Concepts](https://support.doshii.com/developer-support/concepts?hsLang=en)
- [Apps](https://support.doshii.com/developer-support/apps?hsLang=en)

# Doshii Connect Pty Ltd

Doshii Connect Pty Ltd Help Center

Copyright © 2026, Doshii Connect Pty Ltd