Item

Items in Space Invoices represent products, services, and other offerings that an Organization can sell and buy. Items can be saved and later referenced using their unique ID or SKU values.




Adding taxes to items

Taxes can be added to items using the taxIds property. However, you can also reference taxes by their rate or classification value by providing either value as a property in the _itemTaxes array, which is a collection of objects, each representing one tax reference. The API will attempt to find the best match for the specified rate or classification.




Localizing Item content

In addition to the primary content provided for an item, you can also include an additional object with localized content when creating or updating the item.

Item content that can be translated includes: name, description, and unit.

When content is automatically populated in a document from items, the localized content will also be copied if available on the item being used. For more details on this, refer to the "Localizing Document Content" section.

This functionality allows for greater flexibility when working with content in multiple languages.

Endpoints:

  • POST /v1/Organizations/:id/items
  • GET /v1/Items/:id
  • GET /v1/Organizations/:id/items
  • GET /v1/Organizations/:id/items/count
  • GET /v1/Organizations/:id/items/search
  • PUT /v1/Items/:id
  • DELETE /v1/Items/:id
  • GET /v1/Items/:id/inventories

The Item object

Parameters

  • id string readonly

  • name string

  • description string

  • price number

  • priceGross number

  • unit string

  • Additional propertiesExpand all
    
      {
  "type": "string",
  "purchasePrice": 42,
  "purchasePriceGross": 42,
  "name": "string",
  "description": "",
  "price": 42,
  "priceGross": 42,
  "unit": "string",
  "SKU": "string",
  "EAN": "string",
  "trackInventory": true,
  "onBehalf": "string",
  "id": "string",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "taxIds": ["string"],
  "purchaseTaxIds": ["string"],
  "organizationId": "string",
  "unitId": "string",
  "unitIds": ["string"],
  "_components": [{
    "id": "string",
    "amount": 42,
    "itemId": "string",
    "custom": {}
  }],
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }]
}    
  

Create Item

POST /v1/Organizations/:id/items

Parameters

Path
  • id string required

    Organization id

Properties

  • name string optional

  • description string optional

    Default is: ""

  • price number optional

  • priceGross number optional

  • unit string optional

  • Additional propertiesExpand all
      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/items', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    type: 'string',
    purchasePrice: 42,
    purchasePriceGross: 42,
    name: 'string',
    description: '',
    price: 42,
    priceGross: 42,
    unit: 'string',
    SKU: 'string',
    EAN: 'string',
    trackInventory: true,
    onBehalf: 'string',
    custom: {},
    l10n: {},
    taxIds: ['string'],
    purchaseTaxIds: ['string'],
    unitId: 'string',
    unitIds: ['string'],
    _components: [{
      amount: 42,
      itemId: 'string',
      custom: {}
    }],
    _data: [{
      name: 'string',
      value: {},
      options: {}
    }]
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Organizations/{id}/items \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "string", \
    "purchasePrice": 42, \
    "purchasePriceGross": 42, \
    "name": "string", \
    "description": "", \
    "price": 42, \
    "priceGross": 42, \
    "unit": "string", \
    "SKU": "string", \
    "EAN": "string", \
    "trackInventory": true, \
    "onBehalf": "string", \
    "custom": {}, \
    "l10n": {}, \
    "taxIds": ["string"], \
    "purchaseTaxIds": ["string"], \
    "unitId": "string", \
    "unitIds": ["string"], \
    "_components": [{ \
      "amount": 42, \
      "itemId": "string", \
      "custom": {}
    }], \
    "_data": [{ \
      "name": "string", \
      "value": {}, \
      "options": {}
    }]
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/items'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  'type': 'string',
  'purchasePrice': 42,
  'purchasePriceGross': 42,
  'name': 'string',
  'description': '',
  'price': 42,
  'priceGross': 42,
  'unit': 'string',
  'SKU': 'string',
  'EAN': 'string',
  'trackInventory': True,
  'onBehalf': 'string',
  'custom': {},
  'l10n': {},
  'taxIds': ['string'],
  'purchaseTaxIds': ['string'],
  'unitId': 'string',
  'unitIds': ['string'],
  '_components': [{
    'amount': 42,
    'itemId': 'string',
    'custom': {}
  }],
  '_data': [{
    'name': 'string',
    'value': {},
    'options': {}
  }]
}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "type": "string",
  "purchasePrice": 42,
  "purchasePriceGross": 42,
  "name": "string",
  "description": "",
  "price": 42,
  "priceGross": 42,
  "unit": "string",
  "SKU": "string",
  "EAN": "string",
  "trackInventory": true,
  "onBehalf": "string",
  "id": "string",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "taxIds": ["string"],
  "purchaseTaxIds": ["string"],
  "organizationId": "string",
  "unitId": "string",
  "unitIds": ["string"],
  "_components": [{
    "id": "string",
    "amount": 42,
    "itemId": "string",
    "custom": {}
  }],
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }]
}    
  

Get Item

GET /v1/Items/:id

Parameters

Path
  • id string required

    Model id

Query
  • filter string optional

    Filter defining fields and include - must be a JSON-encoded string ({"something":"value"})

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Items/{id}', {
  method: 'GET',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/Items/{id} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Items/{id}'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "type": "string",
  "purchasePrice": 42,
  "purchasePriceGross": 42,
  "name": "string",
  "description": "",
  "price": 42,
  "priceGross": 42,
  "unit": "string",
  "SKU": "string",
  "EAN": "string",
  "trackInventory": true,
  "onBehalf": "string",
  "id": "string",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "taxIds": ["string"],
  "purchaseTaxIds": ["string"],
  "organizationId": "string",
  "unitId": "string",
  "unitIds": ["string"],
  "_components": [{
    "id": "string",
    "amount": 42,
    "itemId": "string",
    "custom": {}
  }],
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }]
}    
  

Find Items

GET /v1/Organizations/:id/items

Parameters

Path
  • id string required

    Organization id

Query
  • filter string optional

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/items', {
  method: 'GET',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/Organizations/{id}/items \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/items'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      [
  {
    "type": "string",
    "purchasePrice": 42,
    "purchasePriceGross": 42,
    "name": "string",
    "description": "",
    "price": 42,
    "priceGross": 42,
    "unit": "string",
    "SKU": "string",
    "EAN": "string",
    "trackInventory": true,
    "onBehalf": "string",
    "id": "string",
    "custom": {},
    "l10n": {},
    "deletedAt": "2022-04-20T10:10:30+00:00Z",
    "_isDeleted": false,
    "deletedId": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "taxIds": ["string"],
    "purchaseTaxIds": ["string"],
    "organizationId": "string",
    "unitId": "string",
    "unitIds": ["string"],
    "_components": [{
      "id": "string",
      "amount": 42,
      "itemId": "string",
      "custom": {}
    }],
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  }
]    
  

Count Items

GET /v1/Organizations/:id/items/count

Parameters

Path
  • id string required

    Organization id

Query
  • where string optional

    Criteria to match model instances

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/items/count', {
  method: 'GET',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/Organizations/{id}/items/count \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/items/count'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "count": 42
}    
  

Search Items

GET /v1/Organizations/:id/items/search

Parameters

Path
  • id string required

    Organization id

Query
  • term string required

  • type string optional

    Optionally limit search to incoming or outgoing

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/items/search', {
  method: 'GET',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/Organizations/{id}/items/search \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/items/search'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      [
  {

  }
]    
  

Replace Item

PUT /v1/Items/:id

Parameters

Path
  • id string required

    Model id

Properties

  • name string optional

  • description string optional

    Default is: ""

  • price number optional

  • priceGross number optional

  • unit string optional

  • Additional propertiesExpand all
      
        const response = await fetch('https://api.spaceinvoices.com/v1/Items/{id}', {
  method: 'PUT',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    type: 'string',
    purchasePrice: 42,
    purchasePriceGross: 42,
    name: 'string',
    description: '',
    price: 42,
    priceGross: 42,
    unit: 'string',
    SKU: 'string',
    EAN: 'string',
    trackInventory: true,
    onBehalf: 'string',
    custom: {},
    l10n: {},
    taxIds: ['string'],
    purchaseTaxIds: ['string'],
    unitId: 'string',
    unitIds: ['string'],
    _components: [{
      amount: 42,
      itemId: 'string',
      custom: {}
    }],
    _data: [{
      name: 'string',
      value: {},
      options: {}
    }]
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X PUT https://api.spaceinvoices.com/v1/Items/{id} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "type": "string", \
    "purchasePrice": 42, \
    "purchasePriceGross": 42, \
    "name": "string", \
    "description": "", \
    "price": 42, \
    "priceGross": 42, \
    "unit": "string", \
    "SKU": "string", \
    "EAN": "string", \
    "trackInventory": true, \
    "onBehalf": "string", \
    "custom": {}, \
    "l10n": {}, \
    "taxIds": ["string"], \
    "purchaseTaxIds": ["string"], \
    "unitId": "string", \
    "unitIds": ["string"], \
    "_components": [{ \
      "amount": 42, \
      "itemId": "string", \
      "custom": {}
    }], \
    "_data": [{ \
      "name": "string", \
      "value": {}, \
      "options": {}
    }]
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Items/{id}'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  'type': 'string',
  'purchasePrice': 42,
  'purchasePriceGross': 42,
  'name': 'string',
  'description': '',
  'price': 42,
  'priceGross': 42,
  'unit': 'string',
  'SKU': 'string',
  'EAN': 'string',
  'trackInventory': True,
  'onBehalf': 'string',
  'custom': {},
  'l10n': {},
  'taxIds': ['string'],
  'purchaseTaxIds': ['string'],
  'unitId': 'string',
  'unitIds': ['string'],
  '_components': [{
    'amount': 42,
    'itemId': 'string',
    'custom': {}
  }],
  '_data': [{
    'name': 'string',
    'value': {},
    'options': {}
  }]
}
response = requests.put(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "type": "string",
  "purchasePrice": 42,
  "purchasePriceGross": 42,
  "name": "string",
  "description": "",
  "price": 42,
  "priceGross": 42,
  "unit": "string",
  "SKU": "string",
  "EAN": "string",
  "trackInventory": true,
  "onBehalf": "string",
  "id": "string",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "taxIds": ["string"],
  "purchaseTaxIds": ["string"],
  "organizationId": "string",
  "unitId": "string",
  "unitIds": ["string"],
  "_components": [{
    "id": "string",
    "amount": 42,
    "itemId": "string",
    "custom": {}
  }],
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }]
}    
  

Delete Item

DELETE /v1/Items/:id

Parameters

Path
  • id string required

    Model id

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Items/{id}', {
  method: 'DELETE',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X DELETE https://api.spaceinvoices.com/v1/Items/{id} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Items/{id}'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.delete(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "count": 1
}    
  

Find Item Inventories

GET /v1/Items/:id/inventories

Parameters

Path
  • id string required

    Item id

Query
  • filter string optional

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Items/{id}/inventories', {
  method: 'GET',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/Items/{id}/inventories \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Items/{id}/inventories'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      [
  {
    "amount": 0,
    "id": "string",
    "itemId": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "warehouseId": "string"
  }
]