Document

Documents, which form the core of our service, are the most intricate part of Space Invoices.

To accommodate a variety of needs, we have meticulously designed the platform to offer an extensive range of options when creating different documents. One of the key features is the ability to provide as much or as little data as desired while the API takes care of the rest. The API can automatically populate document data based on known information, such as organization settings, country of origin, and country of destination.

Endpoints:

  • POST /v1/Organizations/:id/documents
  • GET /v1/Documents/:id
  • GET /v1/Organizations/:id/documents
  • GET /v1/Organizations/:id/documents/count
  • PUT /v1/Documents/:id
  • PATCH /v1/Documents/:id
  • DELETE /v1/Documents/:id
  • POST /v1/Documents/:id/send
  • GET /v1/Documents/:id/pdf
  • POST /v1/Documents/:id/cancel
  • POST /v1/Documents/:id/uncancel
  • POST /v1/Documents/:id/fiscally-verify
  • POST /v1/Documents/:id/mark-sent
  • POST /v1/Documents/:id/attachments/upload
  • GET /v1/Documents/:id/e-slog
  • POST /v1/Documents/parse-xml
  • POST /v1/Documents/:id/share
  • GET /v1/Documents/public/:id
  • GET /v1/Documents/public/:id/e-slog
  • GET /v1/Documents/public/:id/pdf
  • GET /v1/Documents/public/:id/attachments/:attachmentId/download
  • GET /v1/Organizations/:id/is-unique-doc-number
  • GET /v1/Organizations/:id/last-doc-number
  • GET /v1/Organizations/:id/next-doc-number
  • POST /v1/Organizations/:id/documents/parse-image
  • POST /v1/Documents/:id/comments
  • PUT /v1/Documents/:id/comments/:fk
  • DELETE /v1/Documents/:id/comments/:fk

The Document object

Parameters

  • id string readonly

  • _fatturaPa object

  • number string

    Auto-incremented on Document create if not provided.

  • previousDocumentId string

  • draft boolean

  • date date

    Default is today.

  • totalWithTax number readonly

    Document total with taxes.

  • type string

    Defaults is 'invoice'.

  • _documentItems array[object]

    show nested properties
  • _documentClient object

    show nested properties
  • _at object

    show nested properties
  • Additional propertiesExpand all
    
      {
  "_fatturaPa": {},
  "number": "string",
  "previousDocumentId": "string",
  "draft": false,
  "date": "2022-04-20T10:10:30+00:00Z",
  "dateService": "2022-04-20T10:10:30+00:00Z",
  "dateServiceTo": "2022-04-20T10:10:30+00:00Z",
  "dateDue": "2022-04-20T10:10:30+00:00Z",
  "dateValidTill": "2022-04-20T10:10:30+00:00Z",
  "datePaid": "2022-04-20T10:10:30+00:00Z",
  "dateReceived": "2022-04-20T10:10:30+00:00Z",
  "reference": "string",
  "total": 42,
  "totalConverted": 42,
  "totalDiscount": 42,
  "totalWithTax": 42,
  "totalWithTaxConverted": 42,
  "decimalPlaces": 4,
  "note": "string",
  "taxClause": "string",
  "omitTaxes": true,
  "keepPricesAsGross": true,
  "ignoreOmitTaxes": true,
  "footer": "string",
  "signature": "string",
  "type": "invoice",
  "displayName": "string",
  "canceled": false,
  "sentSnailMail": false,
  "totalPaid": 0,
  "totalDue": 0,
  "paidInFull": false,
  "currencyId": "string",
  "_documentTaxes": [{}],
  "_documentReverseTaxes": [{}],
  "hasUnit": true,
  "validateEslog": true,
  "isValidEslog": true,
  "uniqueId": "string",
  "customTotals": true,
  "incoming": false,
  "numberInternal": "string",
  "equalization": 42,
  "issuedAt": "2022-04-20T10:10:30+00:00Z",
  "shareableId": "string",
  "chargesDisabled": true,
  "dateYear": 42,
  "id": "string",
  "documentIds": ["string"],
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "_documentItems": [{
    "id": "string",
    "discount": 42,
    "discountIsAmount": false,
    "quantity": 42,
    "total": 42,
    "totalWithTax": 42,
    "totalTax": 42,
    "totalDiscount": 42,
    "isSeparator": false,
    "name": "string",
    "description": "",
    "price": 42,
    "priceGross": 42,
    "unit": "string",
    "SKU": "string",
    "EAN": "string",
    "trackInventory": true,
    "onBehalf": "string",
    "itemId": "string",
    "custom": {},
    "l10n": {},
    "_documentItemTaxes": [{
      "id": "string",
      "rate": 42,
      "reverseCharged": false,
      "name": "string",
      "abbreviation": "string",
      "recoverable": true,
      "compound": false,
      "taxNumber": "string",
      "taxId": "string"
    }],
    "_components": [{
      "id": "string",
      "amount": 42,
      "itemId": "string",
      "custom": {}
    }],
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  }],
  "_documentIssuer": {
    "id": "string",
    "throwEslogErrors": true,
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "clientId": "string",
  "_documentClient": {
    "id": "string",
    "isEndCustomer": false,
    "throwEslogErrors": true,
    "ipAddress": "string",
    "fatturaPaChannelId": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "organizationId": "string",
  "accountId": "string",
  "_comments": [{
    "id": "string",
    "text": "string",
    "accountId": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z"
  }],
  "_furs": {
    "eor": "string",
    "zoi": "string",
    "qr": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "omitOperatorTaxNumber": false,
    "operatorLabel": "string",
    "foreignOperator": false,
    "iteration": 0,
    "printCount": 0,
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_at": {
    "hash": "string",
    "previousDocumentId": "string",
    "id": "string",
    "accountId": "string",
    "atcudSeriesId": "string"
  },
  "_fina": {
    "JIR": "string",
    "ZKI": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "operatorLabel": "string",
    "paymentType": "string",
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_documentConversionRate": {
    "id": "string",
    "dualCurrency": true,
    "from": "string",
    "to": "string",
    "rate": 42,
    "date": "2022-04-20T10:10:30+00:00Z",
    "source": "string"
  },
  "unitId": "string",
  "_documentUnit": {
    "id": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "priceListId": "string",
  "warehouseId": "string",
  "destinationWarehouseId": "string",
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }],
  "_bPay": {
    "billerCode": "string",
    "reference": "string",
    "hidden": true,
    "id": "string"
  }
}    
  

Create Document

TIPS:

  • To send a document while creating it, include the send property in the API call. When sending the document this way, the recipient will be automatically determined from the document client data, and the message parameters will be sourced from the organization's defaults, unless they are specified in the send object.

  • To mark an invoice document as paid during creation, include the payments property in the API call. When adding a single, full payment to the document, you can omit the amount field, as it will be populated with the calculated total value of the document.

POST /v1/Organizations/:id/documents

Parameters

Path
  • id string required

    Organization id

Properties

  • _documentItems array[object] required

    show nested properties
  • _fatturaPa object optional

  • number string optional

    Auto-incremented on Document create if not provided.

  • previousDocumentId string optional

  • draft boolean optional

    Default is: false

  • date date optional

    Default is today.

  • type string optional

    Default is: invoice

    Defaults is 'invoice'.

  • _documentClient object optional

    show nested properties
  • _at object optional

    show nested properties
  • Additional propertiesExpand all
      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/documents', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    _fatturaPa: {},
    number: 'string',
    previousDocumentId: 'string',
    draft: false,
    date: '2022-04-20T10:10:30+00:00Z',
    dateService: '2022-04-20T10:10:30+00:00Z',
    dateServiceTo: '2022-04-20T10:10:30+00:00Z',
    dateDue: '2022-04-20T10:10:30+00:00Z',
    dateValidTill: '2022-04-20T10:10:30+00:00Z',
    datePaid: '2022-04-20T10:10:30+00:00Z',
    dateReceived: '2022-04-20T10:10:30+00:00Z',
    reference: 'string',
    decimalPlaces: 4,
    note: 'string',
    taxClause: 'string',
    omitTaxes: true,
    keepPricesAsGross: true,
    ignoreOmitTaxes: true,
    footer: 'string',
    signature: 'string',
    type: 'invoice',
    displayName: 'string',
    currencyId: 'string',
    validateEslog: true,
    uniqueId: 'string',
    customTotals: true,
    incoming: false,
    numberInternal: 'string',
    equalization: 42,
    chargesDisabled: true,
    documentIds: ['string'],
    custom: {},
    l10n: {},
    _documentItems: [{
      discount: 42,
      discountIsAmount: false,
      quantity: 42,
      total: 42,
      totalWithTax: 42,
      totalTax: 42,
      totalDiscount: 42,
      isSeparator: false,
      name: 'string',
      description: '',
      price: 42,
      priceGross: 42,
      unit: 'string',
      SKU: 'string',
      EAN: 'string',
      trackInventory: true,
      onBehalf: 'string',
      itemId: 'string',
      custom: {},
      l10n: {},
      _documentItemTaxes: [{
        rate: 42,
        reverseCharged: false,
        name: 'string',
        abbreviation: 'string',
        recoverable: true,
        compound: false,
        taxNumber: 'string',
        taxId: 'string'
      }],
      _components: [{
        amount: 42,
        itemId: 'string',
        custom: {}
      }],
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    }],
    _documentIssuer: {
      throwEslogErrors: true,
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    clientId: 'string',
    _documentClient: {
      isEndCustomer: false,
      throwEslogErrors: true,
      ipAddress: 'string',
      fatturaPaChannelId: 'string',
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    _furs: {
      eor: 'string',
      zoi: 'string',
      qr: 'string',
      businessPremiseId: 'string',
      electronicDeviceId: 'string',
      invoiceNumber: 42,
      strategy: 'string',
      operatorTaxNumber: 'string',
      omitOperatorTaxNumber: false,
      operatorLabel: 'string',
      foreignOperator: false,
      iteration: 0,
      printCount: 0,
      environment: 'production',
      payload: {},
      accountId: 'string'
    },
    _at: {
      hash: 'string',
      previousDocumentId: 'string',
      accountId: 'string',
      atcudSeriesId: 'string'
    },
    _fina: {
      JIR: 'string',
      ZKI: 'string',
      businessPremiseId: 'string',
      electronicDeviceId: 'string',
      invoiceNumber: 42,
      strategy: 'string',
      operatorTaxNumber: 'string',
      operatorLabel: 'string',
      paymentType: 'string',
      environment: 'production',
      payload: {},
      accountId: 'string'
    },
    _documentConversionRate: {
      dualCurrency: true,
      from: 'string',
      to: 'string',
      rate: 42,
      date: '2022-04-20T10:10:30+00:00Z',
      source: 'string'
    },
    unitId: 'string',
    _documentUnit: {
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    priceListId: 'string',
    warehouseId: 'string',
    destinationWarehouseId: 'string',
    _data: [{
      name: 'string',
      value: {},
      options: {}
    }],
    _bPay: {
      billerCode: 'string',
      reference: 'string',
      hidden: true
    }
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Organizations/{id}/documents \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "_fatturaPa": {}, \
    "number": "string", \
    "previousDocumentId": "string", \
    "draft": false, \
    "date": "2022-04-20T10:10:30+00:00Z", \
    "dateService": "2022-04-20T10:10:30+00:00Z", \
    "dateServiceTo": "2022-04-20T10:10:30+00:00Z", \
    "dateDue": "2022-04-20T10:10:30+00:00Z", \
    "dateValidTill": "2022-04-20T10:10:30+00:00Z", \
    "datePaid": "2022-04-20T10:10:30+00:00Z", \
    "dateReceived": "2022-04-20T10:10:30+00:00Z", \
    "reference": "string", \
    "decimalPlaces": 4, \
    "note": "string", \
    "taxClause": "string", \
    "omitTaxes": true, \
    "keepPricesAsGross": true, \
    "ignoreOmitTaxes": true, \
    "footer": "string", \
    "signature": "string", \
    "type": "invoice", \
    "displayName": "string", \
    "currencyId": "string", \
    "validateEslog": true, \
    "uniqueId": "string", \
    "customTotals": true, \
    "incoming": false, \
    "numberInternal": "string", \
    "equalization": 42, \
    "chargesDisabled": true, \
    "documentIds": ["string"], \
    "custom": {}, \
    "l10n": {}, \
    "_documentItems": [{ \
      "discount": 42, \
      "discountIsAmount": false, \
      "quantity": 42, \
      "total": 42, \
      "totalWithTax": 42, \
      "totalTax": 42, \
      "totalDiscount": 42, \
      "isSeparator": false, \
      "name": "string", \
      "description": "", \
      "price": 42, \
      "priceGross": 42, \
      "unit": "string", \
      "SKU": "string", \
      "EAN": "string", \
      "trackInventory": true, \
      "onBehalf": "string", \
      "itemId": "string", \
      "custom": {}, \
      "l10n": {}, \
      "_documentItemTaxes": [{ \
        "rate": 42, \
        "reverseCharged": false, \
        "name": "string", \
        "abbreviation": "string", \
        "recoverable": true, \
        "compound": false, \
        "taxNumber": "string", \
        "taxId": "string"
      }], \
      "_components": [{ \
        "amount": 42, \
        "itemId": "string", \
        "custom": {}
      }], \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }], \
    "_documentIssuer": { \
      "throwEslogErrors": true, \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "clientId": "string", \
    "_documentClient": { \
      "isEndCustomer": false, \
      "throwEslogErrors": true, \
      "ipAddress": "string", \
      "fatturaPaChannelId": "string", \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "_furs": { \
      "eor": "string", \
      "zoi": "string", \
      "qr": "string", \
      "businessPremiseId": "string", \
      "electronicDeviceId": "string", \
      "invoiceNumber": 42, \
      "strategy": "string", \
      "operatorTaxNumber": "string", \
      "omitOperatorTaxNumber": false, \
      "operatorLabel": "string", \
      "foreignOperator": false, \
      "iteration": 0, \
      "printCount": 0, \
      "environment": "production", \
      "payload": {}, \
      "accountId": "string"
    }, \
    "_at": { \
      "hash": "string", \
      "previousDocumentId": "string", \
      "accountId": "string", \
      "atcudSeriesId": "string"
    }, \
    "_fina": { \
      "JIR": "string", \
      "ZKI": "string", \
      "businessPremiseId": "string", \
      "electronicDeviceId": "string", \
      "invoiceNumber": 42, \
      "strategy": "string", \
      "operatorTaxNumber": "string", \
      "operatorLabel": "string", \
      "paymentType": "string", \
      "environment": "production", \
      "payload": {}, \
      "accountId": "string"
    }, \
    "_documentConversionRate": { \
      "dualCurrency": true, \
      "from": "string", \
      "to": "string", \
      "rate": 42, \
      "date": "2022-04-20T10:10:30+00:00Z", \
      "source": "string"
    }, \
    "unitId": "string", \
    "_documentUnit": { \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "priceListId": "string", \
    "warehouseId": "string", \
    "destinationWarehouseId": "string", \
    "_data": [{ \
      "name": "string", \
      "value": {}, \
      "options": {}
    }], \
    "_bPay": { \
      "billerCode": "string", \
      "reference": "string", \
      "hidden": true
    }
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/documents'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  '_fatturaPa': {},
  'number': 'string',
  'previousDocumentId': 'string',
  'draft': False,
  'date': '2022-04-20T10:10:30+00:00Z',
  'dateService': '2022-04-20T10:10:30+00:00Z',
  'dateServiceTo': '2022-04-20T10:10:30+00:00Z',
  'dateDue': '2022-04-20T10:10:30+00:00Z',
  'dateValidTill': '2022-04-20T10:10:30+00:00Z',
  'datePaid': '2022-04-20T10:10:30+00:00Z',
  'dateReceived': '2022-04-20T10:10:30+00:00Z',
  'reference': 'string',
  'decimalPlaces': 4,
  'note': 'string',
  'taxClause': 'string',
  'omitTaxes': True,
  'keepPricesAsGross': True,
  'ignoreOmitTaxes': True,
  'footer': 'string',
  'signature': 'string',
  'type': 'invoice',
  'displayName': 'string',
  'currencyId': 'string',
  'validateEslog': True,
  'uniqueId': 'string',
  'customTotals': True,
  'incoming': False,
  'numberInternal': 'string',
  'equalization': 42,
  'chargesDisabled': True,
  'documentIds': ['string'],
  'custom': {},
  'l10n': {},
  '_documentItems': [{
    'discount': 42,
    'discountIsAmount': False,
    'quantity': 42,
    'total': 42,
    'totalWithTax': 42,
    'totalTax': 42,
    'totalDiscount': 42,
    'isSeparator': False,
    'name': 'string',
    'description': '',
    'price': 42,
    'priceGross': 42,
    'unit': 'string',
    'SKU': 'string',
    'EAN': 'string',
    'trackInventory': True,
    'onBehalf': 'string',
    'itemId': 'string',
    'custom': {},
    'l10n': {},
    '_documentItemTaxes': [{
      'rate': 42,
      'reverseCharged': False,
      'name': 'string',
      'abbreviation': 'string',
      'recoverable': True,
      'compound': False,
      'taxNumber': 'string',
      'taxId': 'string'
    }],
    '_components': [{
      'amount': 42,
      'itemId': 'string',
      'custom': {}
    }],
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  }],
  '_documentIssuer': {
    'throwEslogErrors': True,
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  'clientId': 'string',
  '_documentClient': {
    'isEndCustomer': False,
    'throwEslogErrors': True,
    'ipAddress': 'string',
    'fatturaPaChannelId': 'string',
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  '_furs': {
    'eor': 'string',
    'zoi': 'string',
    'qr': 'string',
    'businessPremiseId': 'string',
    'electronicDeviceId': 'string',
    'invoiceNumber': 42,
    'strategy': 'string',
    'operatorTaxNumber': 'string',
    'omitOperatorTaxNumber': False,
    'operatorLabel': 'string',
    'foreignOperator': False,
    'iteration': 0,
    'printCount': 0,
    'environment': 'production',
    'payload': {},
    'accountId': 'string'
  },
  '_at': {
    'hash': 'string',
    'previousDocumentId': 'string',
    'accountId': 'string',
    'atcudSeriesId': 'string'
  },
  '_fina': {
    'JIR': 'string',
    'ZKI': 'string',
    'businessPremiseId': 'string',
    'electronicDeviceId': 'string',
    'invoiceNumber': 42,
    'strategy': 'string',
    'operatorTaxNumber': 'string',
    'operatorLabel': 'string',
    'paymentType': 'string',
    'environment': 'production',
    'payload': {},
    'accountId': 'string'
  },
  '_documentConversionRate': {
    'dualCurrency': True,
    'from': 'string',
    'to': 'string',
    'rate': 42,
    'date': '2022-04-20T10:10:30+00:00Z',
    'source': 'string'
  },
  'unitId': 'string',
  '_documentUnit': {
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  'priceListId': 'string',
  'warehouseId': 'string',
  'destinationWarehouseId': 'string',
  '_data': [{
    'name': 'string',
    'value': {},
    'options': {}
  }],
  '_bPay': {
    'billerCode': 'string',
    'reference': 'string',
    'hidden': True
  }
}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "_fatturaPa": {},
  "number": "string",
  "previousDocumentId": "string",
  "draft": false,
  "date": "2022-04-20T10:10:30+00:00Z",
  "dateService": "2022-04-20T10:10:30+00:00Z",
  "dateServiceTo": "2022-04-20T10:10:30+00:00Z",
  "dateDue": "2022-04-20T10:10:30+00:00Z",
  "dateValidTill": "2022-04-20T10:10:30+00:00Z",
  "datePaid": "2022-04-20T10:10:30+00:00Z",
  "dateReceived": "2022-04-20T10:10:30+00:00Z",
  "reference": "string",
  "total": 42,
  "totalConverted": 42,
  "totalDiscount": 42,
  "totalWithTax": 42,
  "totalWithTaxConverted": 42,
  "decimalPlaces": 4,
  "note": "string",
  "taxClause": "string",
  "omitTaxes": true,
  "keepPricesAsGross": true,
  "ignoreOmitTaxes": true,
  "footer": "string",
  "signature": "string",
  "type": "invoice",
  "displayName": "string",
  "canceled": false,
  "sentSnailMail": false,
  "totalPaid": 0,
  "totalDue": 0,
  "paidInFull": false,
  "currencyId": "string",
  "_documentTaxes": [{}],
  "_documentReverseTaxes": [{}],
  "hasUnit": true,
  "validateEslog": true,
  "isValidEslog": true,
  "uniqueId": "string",
  "customTotals": true,
  "incoming": false,
  "numberInternal": "string",
  "equalization": 42,
  "issuedAt": "2022-04-20T10:10:30+00:00Z",
  "shareableId": "string",
  "chargesDisabled": true,
  "dateYear": 42,
  "id": "string",
  "documentIds": ["string"],
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "_documentItems": [{
    "id": "string",
    "discount": 42,
    "discountIsAmount": false,
    "quantity": 42,
    "total": 42,
    "totalWithTax": 42,
    "totalTax": 42,
    "totalDiscount": 42,
    "isSeparator": false,
    "name": "string",
    "description": "",
    "price": 42,
    "priceGross": 42,
    "unit": "string",
    "SKU": "string",
    "EAN": "string",
    "trackInventory": true,
    "onBehalf": "string",
    "itemId": "string",
    "custom": {},
    "l10n": {},
    "_documentItemTaxes": [{
      "id": "string",
      "rate": 42,
      "reverseCharged": false,
      "name": "string",
      "abbreviation": "string",
      "recoverable": true,
      "compound": false,
      "taxNumber": "string",
      "taxId": "string"
    }],
    "_components": [{
      "id": "string",
      "amount": 42,
      "itemId": "string",
      "custom": {}
    }],
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  }],
  "_documentIssuer": {
    "id": "string",
    "throwEslogErrors": true,
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "clientId": "string",
  "_documentClient": {
    "id": "string",
    "isEndCustomer": false,
    "throwEslogErrors": true,
    "ipAddress": "string",
    "fatturaPaChannelId": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "organizationId": "string",
  "accountId": "string",
  "_comments": [{
    "id": "string",
    "text": "string",
    "accountId": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z"
  }],
  "_furs": {
    "eor": "string",
    "zoi": "string",
    "qr": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "omitOperatorTaxNumber": false,
    "operatorLabel": "string",
    "foreignOperator": false,
    "iteration": 0,
    "printCount": 0,
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_at": {
    "hash": "string",
    "previousDocumentId": "string",
    "id": "string",
    "accountId": "string",
    "atcudSeriesId": "string"
  },
  "_fina": {
    "JIR": "string",
    "ZKI": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "operatorLabel": "string",
    "paymentType": "string",
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_documentConversionRate": {
    "id": "string",
    "dualCurrency": true,
    "from": "string",
    "to": "string",
    "rate": 42,
    "date": "2022-04-20T10:10:30+00:00Z",
    "source": "string"
  },
  "unitId": "string",
  "_documentUnit": {
    "id": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "priceListId": "string",
  "warehouseId": "string",
  "destinationWarehouseId": "string",
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }],
  "_bPay": {
    "billerCode": "string",
    "reference": "string",
    "hidden": true,
    "id": "string"
  }
}    
  

Get Document

GET /v1/Documents/: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/Documents/{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/Documents/{id} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {
  "_fatturaPa": {},
  "number": "string",
  "previousDocumentId": "string",
  "draft": false,
  "date": "2022-04-20T10:10:30+00:00Z",
  "dateService": "2022-04-20T10:10:30+00:00Z",
  "dateServiceTo": "2022-04-20T10:10:30+00:00Z",
  "dateDue": "2022-04-20T10:10:30+00:00Z",
  "dateValidTill": "2022-04-20T10:10:30+00:00Z",
  "datePaid": "2022-04-20T10:10:30+00:00Z",
  "dateReceived": "2022-04-20T10:10:30+00:00Z",
  "reference": "string",
  "total": 42,
  "totalConverted": 42,
  "totalDiscount": 42,
  "totalWithTax": 42,
  "totalWithTaxConverted": 42,
  "decimalPlaces": 4,
  "note": "string",
  "taxClause": "string",
  "omitTaxes": true,
  "keepPricesAsGross": true,
  "ignoreOmitTaxes": true,
  "footer": "string",
  "signature": "string",
  "type": "invoice",
  "displayName": "string",
  "canceled": false,
  "sentSnailMail": false,
  "totalPaid": 0,
  "totalDue": 0,
  "paidInFull": false,
  "currencyId": "string",
  "_documentTaxes": [{}],
  "_documentReverseTaxes": [{}],
  "hasUnit": true,
  "validateEslog": true,
  "isValidEslog": true,
  "uniqueId": "string",
  "customTotals": true,
  "incoming": false,
  "numberInternal": "string",
  "equalization": 42,
  "issuedAt": "2022-04-20T10:10:30+00:00Z",
  "shareableId": "string",
  "chargesDisabled": true,
  "dateYear": 42,
  "id": "string",
  "documentIds": ["string"],
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "_documentItems": [{
    "id": "string",
    "discount": 42,
    "discountIsAmount": false,
    "quantity": 42,
    "total": 42,
    "totalWithTax": 42,
    "totalTax": 42,
    "totalDiscount": 42,
    "isSeparator": false,
    "name": "string",
    "description": "",
    "price": 42,
    "priceGross": 42,
    "unit": "string",
    "SKU": "string",
    "EAN": "string",
    "trackInventory": true,
    "onBehalf": "string",
    "itemId": "string",
    "custom": {},
    "l10n": {},
    "_documentItemTaxes": [{
      "id": "string",
      "rate": 42,
      "reverseCharged": false,
      "name": "string",
      "abbreviation": "string",
      "recoverable": true,
      "compound": false,
      "taxNumber": "string",
      "taxId": "string"
    }],
    "_components": [{
      "id": "string",
      "amount": 42,
      "itemId": "string",
      "custom": {}
    }],
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  }],
  "_documentIssuer": {
    "id": "string",
    "throwEslogErrors": true,
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "clientId": "string",
  "_documentClient": {
    "id": "string",
    "isEndCustomer": false,
    "throwEslogErrors": true,
    "ipAddress": "string",
    "fatturaPaChannelId": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "organizationId": "string",
  "accountId": "string",
  "_comments": [{
    "id": "string",
    "text": "string",
    "accountId": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z"
  }],
  "_furs": {
    "eor": "string",
    "zoi": "string",
    "qr": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "omitOperatorTaxNumber": false,
    "operatorLabel": "string",
    "foreignOperator": false,
    "iteration": 0,
    "printCount": 0,
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_at": {
    "hash": "string",
    "previousDocumentId": "string",
    "id": "string",
    "accountId": "string",
    "atcudSeriesId": "string"
  },
  "_fina": {
    "JIR": "string",
    "ZKI": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "operatorLabel": "string",
    "paymentType": "string",
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_documentConversionRate": {
    "id": "string",
    "dualCurrency": true,
    "from": "string",
    "to": "string",
    "rate": 42,
    "date": "2022-04-20T10:10:30+00:00Z",
    "source": "string"
  },
  "unitId": "string",
  "_documentUnit": {
    "id": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "priceListId": "string",
  "warehouseId": "string",
  "destinationWarehouseId": "string",
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }],
  "_bPay": {
    "billerCode": "string",
    "reference": "string",
    "hidden": true,
    "id": "string"
  }
}    
  

Find Documents

GET /v1/Organizations/:id/documents

Parameters

Path
  • id string required

    Organization id

Query
  • filter string optional

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/documents', {
  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}/documents \
  -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}/documents'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      [
  {
    "_fatturaPa": {},
    "number": "string",
    "previousDocumentId": "string",
    "draft": false,
    "date": "2022-04-20T10:10:30+00:00Z",
    "dateService": "2022-04-20T10:10:30+00:00Z",
    "dateServiceTo": "2022-04-20T10:10:30+00:00Z",
    "dateDue": "2022-04-20T10:10:30+00:00Z",
    "dateValidTill": "2022-04-20T10:10:30+00:00Z",
    "datePaid": "2022-04-20T10:10:30+00:00Z",
    "dateReceived": "2022-04-20T10:10:30+00:00Z",
    "reference": "string",
    "total": 42,
    "totalConverted": 42,
    "totalDiscount": 42,
    "totalWithTax": 42,
    "totalWithTaxConverted": 42,
    "decimalPlaces": 4,
    "note": "string",
    "taxClause": "string",
    "omitTaxes": true,
    "keepPricesAsGross": true,
    "ignoreOmitTaxes": true,
    "footer": "string",
    "signature": "string",
    "type": "invoice",
    "displayName": "string",
    "canceled": false,
    "sentSnailMail": false,
    "totalPaid": 0,
    "totalDue": 0,
    "paidInFull": false,
    "currencyId": "string",
    "_documentTaxes": [{}],
    "_documentReverseTaxes": [{}],
    "hasUnit": true,
    "validateEslog": true,
    "isValidEslog": true,
    "uniqueId": "string",
    "customTotals": true,
    "incoming": false,
    "numberInternal": "string",
    "equalization": 42,
    "issuedAt": "2022-04-20T10:10:30+00:00Z",
    "shareableId": "string",
    "chargesDisabled": true,
    "dateYear": 42,
    "id": "string",
    "documentIds": ["string"],
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "l10n": {},
    "deletedAt": "2022-04-20T10:10:30+00:00Z",
    "_isDeleted": false,
    "deletedId": "string",
    "_documentItems": [{
      "id": "string",
      "discount": 42,
      "discountIsAmount": false,
      "quantity": 42,
      "total": 42,
      "totalWithTax": 42,
      "totalTax": 42,
      "totalDiscount": 42,
      "isSeparator": false,
      "name": "string",
      "description": "",
      "price": 42,
      "priceGross": 42,
      "unit": "string",
      "SKU": "string",
      "EAN": "string",
      "trackInventory": true,
      "onBehalf": "string",
      "itemId": "string",
      "custom": {},
      "l10n": {},
      "_documentItemTaxes": [{
        "id": "string",
        "rate": 42,
        "reverseCharged": false,
        "name": "string",
        "abbreviation": "string",
        "recoverable": true,
        "compound": false,
        "taxNumber": "string",
        "taxId": "string"
      }],
      "_components": [{
        "id": "string",
        "amount": 42,
        "itemId": "string",
        "custom": {}
      }],
      "_data": [{
        "id": "string",
        "name": "string",
        "value": {},
        "options": {}
      }]
    }],
    "_documentIssuer": {
      "id": "string",
      "throwEslogErrors": true,
      "name": "string",
      "address": "string",
      "address2": "string",
      "city": "string",
      "zip": "string",
      "state": "string",
      "country": "string",
      "countryAlpha2Code": "string",
      "taxNumber": "string",
      "taxSubject": true,
      "companyNumber": "string",
      "IBAN": "string",
      "bank": "string",
      "SWIFT": "string",
      "website": "string",
      "email": "string",
      "phone": "string",
      "businessType": "string",
      "createdAt": "2022-04-20T10:10:30+00:00Z",
      "updatedAt": "2022-04-20T10:10:30+00:00Z",
      "custom": {},
      "_data": [{
        "id": "string",
        "name": "string",
        "value": {},
        "options": {}
      }]
    },
    "clientId": "string",
    "_documentClient": {
      "id": "string",
      "isEndCustomer": false,
      "throwEslogErrors": true,
      "ipAddress": "string",
      "fatturaPaChannelId": "string",
      "name": "string",
      "address": "string",
      "address2": "string",
      "city": "string",
      "zip": "string",
      "state": "string",
      "country": "string",
      "countryAlpha2Code": "string",
      "taxNumber": "string",
      "taxSubject": true,
      "companyNumber": "string",
      "IBAN": "string",
      "bank": "string",
      "SWIFT": "string",
      "website": "string",
      "email": "string",
      "phone": "string",
      "businessType": "string",
      "createdAt": "2022-04-20T10:10:30+00:00Z",
      "updatedAt": "2022-04-20T10:10:30+00:00Z",
      "custom": {},
      "_data": [{
        "id": "string",
        "name": "string",
        "value": {},
        "options": {}
      }]
    },
    "organizationId": "string",
    "accountId": "string",
    "_comments": [{
      "id": "string",
      "text": "string",
      "accountId": "string",
      "createdAt": "2022-04-20T10:10:30+00:00Z",
      "updatedAt": "2022-04-20T10:10:30+00:00Z"
    }],
    "_furs": {
      "eor": "string",
      "zoi": "string",
      "qr": "string",
      "businessPremiseId": "string",
      "electronicDeviceId": "string",
      "invoiceNumber": 42,
      "strategy": "string",
      "operatorTaxNumber": "string",
      "omitOperatorTaxNumber": false,
      "operatorLabel": "string",
      "foreignOperator": false,
      "iteration": 0,
      "printCount": 0,
      "environment": "production",
      "payload": {},
      "id": "string",
      "accountId": "string"
    },
    "_at": {
      "hash": "string",
      "previousDocumentId": "string",
      "id": "string",
      "accountId": "string",
      "atcudSeriesId": "string"
    },
    "_fina": {
      "JIR": "string",
      "ZKI": "string",
      "businessPremiseId": "string",
      "electronicDeviceId": "string",
      "invoiceNumber": 42,
      "strategy": "string",
      "operatorTaxNumber": "string",
      "operatorLabel": "string",
      "paymentType": "string",
      "environment": "production",
      "payload": {},
      "id": "string",
      "accountId": "string"
    },
    "_documentConversionRate": {
      "id": "string",
      "dualCurrency": true,
      "from": "string",
      "to": "string",
      "rate": 42,
      "date": "2022-04-20T10:10:30+00:00Z",
      "source": "string"
    },
    "unitId": "string",
    "_documentUnit": {
      "id": "string",
      "name": "string",
      "address": "string",
      "address2": "string",
      "city": "string",
      "zip": "string",
      "state": "string",
      "country": "string",
      "countryAlpha2Code": "string",
      "taxNumber": "string",
      "taxSubject": true,
      "companyNumber": "string",
      "IBAN": "string",
      "bank": "string",
      "SWIFT": "string",
      "website": "string",
      "email": "string",
      "phone": "string",
      "businessType": "string",
      "createdAt": "2022-04-20T10:10:30+00:00Z",
      "updatedAt": "2022-04-20T10:10:30+00:00Z",
      "custom": {},
      "_data": [{
        "id": "string",
        "name": "string",
        "value": {},
        "options": {}
      }]
    },
    "priceListId": "string",
    "warehouseId": "string",
    "destinationWarehouseId": "string",
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }],
    "_bPay": {
      "billerCode": "string",
      "reference": "string",
      "hidden": true,
      "id": "string"
    }
  }
]    
  

Count Documents

GET /v1/Organizations/:id/documents/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}/documents/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}/documents/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}/documents/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
}    
  

Replace Document

PUT /v1/Documents/:id

Parameters

Path
  • id string required

    Model id

Properties

  • _documentItems array[object] required

    show nested properties
  • _fatturaPa object optional

  • number string optional

    Auto-incremented on Document create if not provided.

  • previousDocumentId string optional

  • draft boolean optional

    Default is: false

  • date date optional

    Default is today.

  • type string optional

    Default is: invoice

    Defaults is 'invoice'.

  • _documentClient object optional

    show nested properties
  • _at object optional

    show nested properties
  • Additional propertiesExpand all
      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}', {
  method: 'PUT',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    _fatturaPa: {},
    number: 'string',
    previousDocumentId: 'string',
    draft: false,
    date: '2022-04-20T10:10:30+00:00Z',
    dateService: '2022-04-20T10:10:30+00:00Z',
    dateServiceTo: '2022-04-20T10:10:30+00:00Z',
    dateDue: '2022-04-20T10:10:30+00:00Z',
    dateValidTill: '2022-04-20T10:10:30+00:00Z',
    datePaid: '2022-04-20T10:10:30+00:00Z',
    dateReceived: '2022-04-20T10:10:30+00:00Z',
    reference: 'string',
    decimalPlaces: 4,
    note: 'string',
    taxClause: 'string',
    omitTaxes: true,
    keepPricesAsGross: true,
    ignoreOmitTaxes: true,
    footer: 'string',
    signature: 'string',
    type: 'invoice',
    displayName: 'string',
    currencyId: 'string',
    validateEslog: true,
    uniqueId: 'string',
    customTotals: true,
    incoming: false,
    numberInternal: 'string',
    equalization: 42,
    chargesDisabled: true,
    documentIds: ['string'],
    custom: {},
    l10n: {},
    _documentItems: [{
      discount: 42,
      discountIsAmount: false,
      quantity: 42,
      total: 42,
      totalWithTax: 42,
      totalTax: 42,
      totalDiscount: 42,
      isSeparator: false,
      name: 'string',
      description: '',
      price: 42,
      priceGross: 42,
      unit: 'string',
      SKU: 'string',
      EAN: 'string',
      trackInventory: true,
      onBehalf: 'string',
      itemId: 'string',
      custom: {},
      l10n: {},
      _documentItemTaxes: [{
        rate: 42,
        reverseCharged: false,
        name: 'string',
        abbreviation: 'string',
        recoverable: true,
        compound: false,
        taxNumber: 'string',
        taxId: 'string'
      }],
      _components: [{
        amount: 42,
        itemId: 'string',
        custom: {}
      }],
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    }],
    _documentIssuer: {
      throwEslogErrors: true,
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    clientId: 'string',
    _documentClient: {
      isEndCustomer: false,
      throwEslogErrors: true,
      ipAddress: 'string',
      fatturaPaChannelId: 'string',
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    _furs: {
      eor: 'string',
      zoi: 'string',
      qr: 'string',
      businessPremiseId: 'string',
      electronicDeviceId: 'string',
      invoiceNumber: 42,
      strategy: 'string',
      operatorTaxNumber: 'string',
      omitOperatorTaxNumber: false,
      operatorLabel: 'string',
      foreignOperator: false,
      iteration: 0,
      printCount: 0,
      environment: 'production',
      payload: {},
      accountId: 'string'
    },
    _at: {
      hash: 'string',
      previousDocumentId: 'string',
      accountId: 'string',
      atcudSeriesId: 'string'
    },
    _fina: {
      JIR: 'string',
      ZKI: 'string',
      businessPremiseId: 'string',
      electronicDeviceId: 'string',
      invoiceNumber: 42,
      strategy: 'string',
      operatorTaxNumber: 'string',
      operatorLabel: 'string',
      paymentType: 'string',
      environment: 'production',
      payload: {},
      accountId: 'string'
    },
    _documentConversionRate: {
      dualCurrency: true,
      from: 'string',
      to: 'string',
      rate: 42,
      date: '2022-04-20T10:10:30+00:00Z',
      source: 'string'
    },
    unitId: 'string',
    _documentUnit: {
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    priceListId: 'string',
    warehouseId: 'string',
    destinationWarehouseId: 'string',
    _data: [{
      name: 'string',
      value: {},
      options: {}
    }],
    _bPay: {
      billerCode: 'string',
      reference: 'string',
      hidden: true
    }
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X PUT https://api.spaceinvoices.com/v1/Documents/{id} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "_fatturaPa": {}, \
    "number": "string", \
    "previousDocumentId": "string", \
    "draft": false, \
    "date": "2022-04-20T10:10:30+00:00Z", \
    "dateService": "2022-04-20T10:10:30+00:00Z", \
    "dateServiceTo": "2022-04-20T10:10:30+00:00Z", \
    "dateDue": "2022-04-20T10:10:30+00:00Z", \
    "dateValidTill": "2022-04-20T10:10:30+00:00Z", \
    "datePaid": "2022-04-20T10:10:30+00:00Z", \
    "dateReceived": "2022-04-20T10:10:30+00:00Z", \
    "reference": "string", \
    "decimalPlaces": 4, \
    "note": "string", \
    "taxClause": "string", \
    "omitTaxes": true, \
    "keepPricesAsGross": true, \
    "ignoreOmitTaxes": true, \
    "footer": "string", \
    "signature": "string", \
    "type": "invoice", \
    "displayName": "string", \
    "currencyId": "string", \
    "validateEslog": true, \
    "uniqueId": "string", \
    "customTotals": true, \
    "incoming": false, \
    "numberInternal": "string", \
    "equalization": 42, \
    "chargesDisabled": true, \
    "documentIds": ["string"], \
    "custom": {}, \
    "l10n": {}, \
    "_documentItems": [{ \
      "discount": 42, \
      "discountIsAmount": false, \
      "quantity": 42, \
      "total": 42, \
      "totalWithTax": 42, \
      "totalTax": 42, \
      "totalDiscount": 42, \
      "isSeparator": false, \
      "name": "string", \
      "description": "", \
      "price": 42, \
      "priceGross": 42, \
      "unit": "string", \
      "SKU": "string", \
      "EAN": "string", \
      "trackInventory": true, \
      "onBehalf": "string", \
      "itemId": "string", \
      "custom": {}, \
      "l10n": {}, \
      "_documentItemTaxes": [{ \
        "rate": 42, \
        "reverseCharged": false, \
        "name": "string", \
        "abbreviation": "string", \
        "recoverable": true, \
        "compound": false, \
        "taxNumber": "string", \
        "taxId": "string"
      }], \
      "_components": [{ \
        "amount": 42, \
        "itemId": "string", \
        "custom": {}
      }], \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }], \
    "_documentIssuer": { \
      "throwEslogErrors": true, \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "clientId": "string", \
    "_documentClient": { \
      "isEndCustomer": false, \
      "throwEslogErrors": true, \
      "ipAddress": "string", \
      "fatturaPaChannelId": "string", \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "_furs": { \
      "eor": "string", \
      "zoi": "string", \
      "qr": "string", \
      "businessPremiseId": "string", \
      "electronicDeviceId": "string", \
      "invoiceNumber": 42, \
      "strategy": "string", \
      "operatorTaxNumber": "string", \
      "omitOperatorTaxNumber": false, \
      "operatorLabel": "string", \
      "foreignOperator": false, \
      "iteration": 0, \
      "printCount": 0, \
      "environment": "production", \
      "payload": {}, \
      "accountId": "string"
    }, \
    "_at": { \
      "hash": "string", \
      "previousDocumentId": "string", \
      "accountId": "string", \
      "atcudSeriesId": "string"
    }, \
    "_fina": { \
      "JIR": "string", \
      "ZKI": "string", \
      "businessPremiseId": "string", \
      "electronicDeviceId": "string", \
      "invoiceNumber": 42, \
      "strategy": "string", \
      "operatorTaxNumber": "string", \
      "operatorLabel": "string", \
      "paymentType": "string", \
      "environment": "production", \
      "payload": {}, \
      "accountId": "string"
    }, \
    "_documentConversionRate": { \
      "dualCurrency": true, \
      "from": "string", \
      "to": "string", \
      "rate": 42, \
      "date": "2022-04-20T10:10:30+00:00Z", \
      "source": "string"
    }, \
    "unitId": "string", \
    "_documentUnit": { \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "priceListId": "string", \
    "warehouseId": "string", \
    "destinationWarehouseId": "string", \
    "_data": [{ \
      "name": "string", \
      "value": {}, \
      "options": {}
    }], \
    "_bPay": { \
      "billerCode": "string", \
      "reference": "string", \
      "hidden": true
    }
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  '_fatturaPa': {},
  'number': 'string',
  'previousDocumentId': 'string',
  'draft': False,
  'date': '2022-04-20T10:10:30+00:00Z',
  'dateService': '2022-04-20T10:10:30+00:00Z',
  'dateServiceTo': '2022-04-20T10:10:30+00:00Z',
  'dateDue': '2022-04-20T10:10:30+00:00Z',
  'dateValidTill': '2022-04-20T10:10:30+00:00Z',
  'datePaid': '2022-04-20T10:10:30+00:00Z',
  'dateReceived': '2022-04-20T10:10:30+00:00Z',
  'reference': 'string',
  'decimalPlaces': 4,
  'note': 'string',
  'taxClause': 'string',
  'omitTaxes': True,
  'keepPricesAsGross': True,
  'ignoreOmitTaxes': True,
  'footer': 'string',
  'signature': 'string',
  'type': 'invoice',
  'displayName': 'string',
  'currencyId': 'string',
  'validateEslog': True,
  'uniqueId': 'string',
  'customTotals': True,
  'incoming': False,
  'numberInternal': 'string',
  'equalization': 42,
  'chargesDisabled': True,
  'documentIds': ['string'],
  'custom': {},
  'l10n': {},
  '_documentItems': [{
    'discount': 42,
    'discountIsAmount': False,
    'quantity': 42,
    'total': 42,
    'totalWithTax': 42,
    'totalTax': 42,
    'totalDiscount': 42,
    'isSeparator': False,
    'name': 'string',
    'description': '',
    'price': 42,
    'priceGross': 42,
    'unit': 'string',
    'SKU': 'string',
    'EAN': 'string',
    'trackInventory': True,
    'onBehalf': 'string',
    'itemId': 'string',
    'custom': {},
    'l10n': {},
    '_documentItemTaxes': [{
      'rate': 42,
      'reverseCharged': False,
      'name': 'string',
      'abbreviation': 'string',
      'recoverable': True,
      'compound': False,
      'taxNumber': 'string',
      'taxId': 'string'
    }],
    '_components': [{
      'amount': 42,
      'itemId': 'string',
      'custom': {}
    }],
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  }],
  '_documentIssuer': {
    'throwEslogErrors': True,
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  'clientId': 'string',
  '_documentClient': {
    'isEndCustomer': False,
    'throwEslogErrors': True,
    'ipAddress': 'string',
    'fatturaPaChannelId': 'string',
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  '_furs': {
    'eor': 'string',
    'zoi': 'string',
    'qr': 'string',
    'businessPremiseId': 'string',
    'electronicDeviceId': 'string',
    'invoiceNumber': 42,
    'strategy': 'string',
    'operatorTaxNumber': 'string',
    'omitOperatorTaxNumber': False,
    'operatorLabel': 'string',
    'foreignOperator': False,
    'iteration': 0,
    'printCount': 0,
    'environment': 'production',
    'payload': {},
    'accountId': 'string'
  },
  '_at': {
    'hash': 'string',
    'previousDocumentId': 'string',
    'accountId': 'string',
    'atcudSeriesId': 'string'
  },
  '_fina': {
    'JIR': 'string',
    'ZKI': 'string',
    'businessPremiseId': 'string',
    'electronicDeviceId': 'string',
    'invoiceNumber': 42,
    'strategy': 'string',
    'operatorTaxNumber': 'string',
    'operatorLabel': 'string',
    'paymentType': 'string',
    'environment': 'production',
    'payload': {},
    'accountId': 'string'
  },
  '_documentConversionRate': {
    'dualCurrency': True,
    'from': 'string',
    'to': 'string',
    'rate': 42,
    'date': '2022-04-20T10:10:30+00:00Z',
    'source': 'string'
  },
  'unitId': 'string',
  '_documentUnit': {
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  'priceListId': 'string',
  'warehouseId': 'string',
  'destinationWarehouseId': 'string',
  '_data': [{
    'name': 'string',
    'value': {},
    'options': {}
  }],
  '_bPay': {
    'billerCode': 'string',
    'reference': 'string',
    'hidden': True
  }
}
response = requests.put(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "_fatturaPa": {},
  "number": "string",
  "previousDocumentId": "string",
  "draft": false,
  "date": "2022-04-20T10:10:30+00:00Z",
  "dateService": "2022-04-20T10:10:30+00:00Z",
  "dateServiceTo": "2022-04-20T10:10:30+00:00Z",
  "dateDue": "2022-04-20T10:10:30+00:00Z",
  "dateValidTill": "2022-04-20T10:10:30+00:00Z",
  "datePaid": "2022-04-20T10:10:30+00:00Z",
  "dateReceived": "2022-04-20T10:10:30+00:00Z",
  "reference": "string",
  "total": 42,
  "totalConverted": 42,
  "totalDiscount": 42,
  "totalWithTax": 42,
  "totalWithTaxConverted": 42,
  "decimalPlaces": 4,
  "note": "string",
  "taxClause": "string",
  "omitTaxes": true,
  "keepPricesAsGross": true,
  "ignoreOmitTaxes": true,
  "footer": "string",
  "signature": "string",
  "type": "invoice",
  "displayName": "string",
  "canceled": false,
  "sentSnailMail": false,
  "totalPaid": 0,
  "totalDue": 0,
  "paidInFull": false,
  "currencyId": "string",
  "_documentTaxes": [{}],
  "_documentReverseTaxes": [{}],
  "hasUnit": true,
  "validateEslog": true,
  "isValidEslog": true,
  "uniqueId": "string",
  "customTotals": true,
  "incoming": false,
  "numberInternal": "string",
  "equalization": 42,
  "issuedAt": "2022-04-20T10:10:30+00:00Z",
  "shareableId": "string",
  "chargesDisabled": true,
  "dateYear": 42,
  "id": "string",
  "documentIds": ["string"],
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "_documentItems": [{
    "id": "string",
    "discount": 42,
    "discountIsAmount": false,
    "quantity": 42,
    "total": 42,
    "totalWithTax": 42,
    "totalTax": 42,
    "totalDiscount": 42,
    "isSeparator": false,
    "name": "string",
    "description": "",
    "price": 42,
    "priceGross": 42,
    "unit": "string",
    "SKU": "string",
    "EAN": "string",
    "trackInventory": true,
    "onBehalf": "string",
    "itemId": "string",
    "custom": {},
    "l10n": {},
    "_documentItemTaxes": [{
      "id": "string",
      "rate": 42,
      "reverseCharged": false,
      "name": "string",
      "abbreviation": "string",
      "recoverable": true,
      "compound": false,
      "taxNumber": "string",
      "taxId": "string"
    }],
    "_components": [{
      "id": "string",
      "amount": 42,
      "itemId": "string",
      "custom": {}
    }],
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  }],
  "_documentIssuer": {
    "id": "string",
    "throwEslogErrors": true,
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "clientId": "string",
  "_documentClient": {
    "id": "string",
    "isEndCustomer": false,
    "throwEslogErrors": true,
    "ipAddress": "string",
    "fatturaPaChannelId": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "organizationId": "string",
  "accountId": "string",
  "_comments": [{
    "id": "string",
    "text": "string",
    "accountId": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z"
  }],
  "_furs": {
    "eor": "string",
    "zoi": "string",
    "qr": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "omitOperatorTaxNumber": false,
    "operatorLabel": "string",
    "foreignOperator": false,
    "iteration": 0,
    "printCount": 0,
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_at": {
    "hash": "string",
    "previousDocumentId": "string",
    "id": "string",
    "accountId": "string",
    "atcudSeriesId": "string"
  },
  "_fina": {
    "JIR": "string",
    "ZKI": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "operatorLabel": "string",
    "paymentType": "string",
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_documentConversionRate": {
    "id": "string",
    "dualCurrency": true,
    "from": "string",
    "to": "string",
    "rate": 42,
    "date": "2022-04-20T10:10:30+00:00Z",
    "source": "string"
  },
  "unitId": "string",
  "_documentUnit": {
    "id": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "priceListId": "string",
  "warehouseId": "string",
  "destinationWarehouseId": "string",
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }],
  "_bPay": {
    "billerCode": "string",
    "reference": "string",
    "hidden": true,
    "id": "string"
  }
}    
  

Patch Document

PATCH /v1/Documents/:id

Parameters

Path
  • id string required

    Document id

Properties

  • _documentItems array[object] required

    show nested properties
  • _fatturaPa object optional

  • number string optional

    Auto-incremented on Document create if not provided.

  • previousDocumentId string optional

  • draft boolean optional

    Default is: false

  • date date optional

    Default is today.

  • type string optional

    Default is: invoice

    Defaults is 'invoice'.

  • _documentClient object optional

    show nested properties
  • _at object optional

    show nested properties
  • Additional propertiesExpand all
      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}', {
  method: 'PATCH',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    _fatturaPa: {},
    number: 'string',
    previousDocumentId: 'string',
    draft: false,
    date: '2022-04-20T10:10:30+00:00Z',
    dateService: '2022-04-20T10:10:30+00:00Z',
    dateServiceTo: '2022-04-20T10:10:30+00:00Z',
    dateDue: '2022-04-20T10:10:30+00:00Z',
    dateValidTill: '2022-04-20T10:10:30+00:00Z',
    datePaid: '2022-04-20T10:10:30+00:00Z',
    dateReceived: '2022-04-20T10:10:30+00:00Z',
    reference: 'string',
    decimalPlaces: 4,
    note: 'string',
    taxClause: 'string',
    omitTaxes: true,
    keepPricesAsGross: true,
    ignoreOmitTaxes: true,
    footer: 'string',
    signature: 'string',
    type: 'invoice',
    displayName: 'string',
    currencyId: 'string',
    validateEslog: true,
    uniqueId: 'string',
    customTotals: true,
    incoming: false,
    numberInternal: 'string',
    equalization: 42,
    chargesDisabled: true,
    documentIds: ['string'],
    custom: {},
    l10n: {},
    _documentItems: [{
      discount: 42,
      discountIsAmount: false,
      quantity: 42,
      total: 42,
      totalWithTax: 42,
      totalTax: 42,
      totalDiscount: 42,
      isSeparator: false,
      name: 'string',
      description: '',
      price: 42,
      priceGross: 42,
      unit: 'string',
      SKU: 'string',
      EAN: 'string',
      trackInventory: true,
      onBehalf: 'string',
      itemId: 'string',
      custom: {},
      l10n: {},
      _documentItemTaxes: [{
        rate: 42,
        reverseCharged: false,
        name: 'string',
        abbreviation: 'string',
        recoverable: true,
        compound: false,
        taxNumber: 'string',
        taxId: 'string'
      }],
      _components: [{
        amount: 42,
        itemId: 'string',
        custom: {}
      }],
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    }],
    _documentIssuer: {
      throwEslogErrors: true,
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    clientId: 'string',
    _documentClient: {
      isEndCustomer: false,
      throwEslogErrors: true,
      ipAddress: 'string',
      fatturaPaChannelId: 'string',
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    _furs: {
      eor: 'string',
      zoi: 'string',
      qr: 'string',
      businessPremiseId: 'string',
      electronicDeviceId: 'string',
      invoiceNumber: 42,
      strategy: 'string',
      operatorTaxNumber: 'string',
      omitOperatorTaxNumber: false,
      operatorLabel: 'string',
      foreignOperator: false,
      iteration: 0,
      printCount: 0,
      environment: 'production',
      payload: {},
      accountId: 'string'
    },
    _at: {
      hash: 'string',
      previousDocumentId: 'string',
      accountId: 'string',
      atcudSeriesId: 'string'
    },
    _fina: {
      JIR: 'string',
      ZKI: 'string',
      businessPremiseId: 'string',
      electronicDeviceId: 'string',
      invoiceNumber: 42,
      strategy: 'string',
      operatorTaxNumber: 'string',
      operatorLabel: 'string',
      paymentType: 'string',
      environment: 'production',
      payload: {},
      accountId: 'string'
    },
    _documentConversionRate: {
      dualCurrency: true,
      from: 'string',
      to: 'string',
      rate: 42,
      date: '2022-04-20T10:10:30+00:00Z',
      source: 'string'
    },
    unitId: 'string',
    _documentUnit: {
      name: 'string',
      address: 'string',
      address2: 'string',
      city: 'string',
      zip: 'string',
      state: 'string',
      country: 'string',
      countryAlpha2Code: 'string',
      taxNumber: 'string',
      taxSubject: true,
      companyNumber: 'string',
      IBAN: 'string',
      bank: 'string',
      SWIFT: 'string',
      website: 'string',
      email: 'string',
      phone: 'string',
      businessType: 'string',
      custom: {},
      _data: [{
        name: 'string',
        value: {},
        options: {}
      }]
    },
    priceListId: 'string',
    warehouseId: 'string',
    destinationWarehouseId: 'string',
    _data: [{
      name: 'string',
      value: {},
      options: {}
    }],
    _bPay: {
      billerCode: 'string',
      reference: 'string',
      hidden: true
    }
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X PATCH https://api.spaceinvoices.com/v1/Documents/{id} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "_fatturaPa": {}, \
    "number": "string", \
    "previousDocumentId": "string", \
    "draft": false, \
    "date": "2022-04-20T10:10:30+00:00Z", \
    "dateService": "2022-04-20T10:10:30+00:00Z", \
    "dateServiceTo": "2022-04-20T10:10:30+00:00Z", \
    "dateDue": "2022-04-20T10:10:30+00:00Z", \
    "dateValidTill": "2022-04-20T10:10:30+00:00Z", \
    "datePaid": "2022-04-20T10:10:30+00:00Z", \
    "dateReceived": "2022-04-20T10:10:30+00:00Z", \
    "reference": "string", \
    "decimalPlaces": 4, \
    "note": "string", \
    "taxClause": "string", \
    "omitTaxes": true, \
    "keepPricesAsGross": true, \
    "ignoreOmitTaxes": true, \
    "footer": "string", \
    "signature": "string", \
    "type": "invoice", \
    "displayName": "string", \
    "currencyId": "string", \
    "validateEslog": true, \
    "uniqueId": "string", \
    "customTotals": true, \
    "incoming": false, \
    "numberInternal": "string", \
    "equalization": 42, \
    "chargesDisabled": true, \
    "documentIds": ["string"], \
    "custom": {}, \
    "l10n": {}, \
    "_documentItems": [{ \
      "discount": 42, \
      "discountIsAmount": false, \
      "quantity": 42, \
      "total": 42, \
      "totalWithTax": 42, \
      "totalTax": 42, \
      "totalDiscount": 42, \
      "isSeparator": false, \
      "name": "string", \
      "description": "", \
      "price": 42, \
      "priceGross": 42, \
      "unit": "string", \
      "SKU": "string", \
      "EAN": "string", \
      "trackInventory": true, \
      "onBehalf": "string", \
      "itemId": "string", \
      "custom": {}, \
      "l10n": {}, \
      "_documentItemTaxes": [{ \
        "rate": 42, \
        "reverseCharged": false, \
        "name": "string", \
        "abbreviation": "string", \
        "recoverable": true, \
        "compound": false, \
        "taxNumber": "string", \
        "taxId": "string"
      }], \
      "_components": [{ \
        "amount": 42, \
        "itemId": "string", \
        "custom": {}
      }], \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }], \
    "_documentIssuer": { \
      "throwEslogErrors": true, \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "clientId": "string", \
    "_documentClient": { \
      "isEndCustomer": false, \
      "throwEslogErrors": true, \
      "ipAddress": "string", \
      "fatturaPaChannelId": "string", \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "_furs": { \
      "eor": "string", \
      "zoi": "string", \
      "qr": "string", \
      "businessPremiseId": "string", \
      "electronicDeviceId": "string", \
      "invoiceNumber": 42, \
      "strategy": "string", \
      "operatorTaxNumber": "string", \
      "omitOperatorTaxNumber": false, \
      "operatorLabel": "string", \
      "foreignOperator": false, \
      "iteration": 0, \
      "printCount": 0, \
      "environment": "production", \
      "payload": {}, \
      "accountId": "string"
    }, \
    "_at": { \
      "hash": "string", \
      "previousDocumentId": "string", \
      "accountId": "string", \
      "atcudSeriesId": "string"
    }, \
    "_fina": { \
      "JIR": "string", \
      "ZKI": "string", \
      "businessPremiseId": "string", \
      "electronicDeviceId": "string", \
      "invoiceNumber": 42, \
      "strategy": "string", \
      "operatorTaxNumber": "string", \
      "operatorLabel": "string", \
      "paymentType": "string", \
      "environment": "production", \
      "payload": {}, \
      "accountId": "string"
    }, \
    "_documentConversionRate": { \
      "dualCurrency": true, \
      "from": "string", \
      "to": "string", \
      "rate": 42, \
      "date": "2022-04-20T10:10:30+00:00Z", \
      "source": "string"
    }, \
    "unitId": "string", \
    "_documentUnit": { \
      "name": "string", \
      "address": "string", \
      "address2": "string", \
      "city": "string", \
      "zip": "string", \
      "state": "string", \
      "country": "string", \
      "countryAlpha2Code": "string", \
      "taxNumber": "string", \
      "taxSubject": true, \
      "companyNumber": "string", \
      "IBAN": "string", \
      "bank": "string", \
      "SWIFT": "string", \
      "website": "string", \
      "email": "string", \
      "phone": "string", \
      "businessType": "string", \
      "custom": {}, \
      "_data": [{ \
        "name": "string", \
        "value": {}, \
        "options": {}
      }]
    }, \
    "priceListId": "string", \
    "warehouseId": "string", \
    "destinationWarehouseId": "string", \
    "_data": [{ \
      "name": "string", \
      "value": {}, \
      "options": {}
    }], \
    "_bPay": { \
      "billerCode": "string", \
      "reference": "string", \
      "hidden": true
    }
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  '_fatturaPa': {},
  'number': 'string',
  'previousDocumentId': 'string',
  'draft': False,
  'date': '2022-04-20T10:10:30+00:00Z',
  'dateService': '2022-04-20T10:10:30+00:00Z',
  'dateServiceTo': '2022-04-20T10:10:30+00:00Z',
  'dateDue': '2022-04-20T10:10:30+00:00Z',
  'dateValidTill': '2022-04-20T10:10:30+00:00Z',
  'datePaid': '2022-04-20T10:10:30+00:00Z',
  'dateReceived': '2022-04-20T10:10:30+00:00Z',
  'reference': 'string',
  'decimalPlaces': 4,
  'note': 'string',
  'taxClause': 'string',
  'omitTaxes': True,
  'keepPricesAsGross': True,
  'ignoreOmitTaxes': True,
  'footer': 'string',
  'signature': 'string',
  'type': 'invoice',
  'displayName': 'string',
  'currencyId': 'string',
  'validateEslog': True,
  'uniqueId': 'string',
  'customTotals': True,
  'incoming': False,
  'numberInternal': 'string',
  'equalization': 42,
  'chargesDisabled': True,
  'documentIds': ['string'],
  'custom': {},
  'l10n': {},
  '_documentItems': [{
    'discount': 42,
    'discountIsAmount': False,
    'quantity': 42,
    'total': 42,
    'totalWithTax': 42,
    'totalTax': 42,
    'totalDiscount': 42,
    'isSeparator': False,
    'name': 'string',
    'description': '',
    'price': 42,
    'priceGross': 42,
    'unit': 'string',
    'SKU': 'string',
    'EAN': 'string',
    'trackInventory': True,
    'onBehalf': 'string',
    'itemId': 'string',
    'custom': {},
    'l10n': {},
    '_documentItemTaxes': [{
      'rate': 42,
      'reverseCharged': False,
      'name': 'string',
      'abbreviation': 'string',
      'recoverable': True,
      'compound': False,
      'taxNumber': 'string',
      'taxId': 'string'
    }],
    '_components': [{
      'amount': 42,
      'itemId': 'string',
      'custom': {}
    }],
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  }],
  '_documentIssuer': {
    'throwEslogErrors': True,
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  'clientId': 'string',
  '_documentClient': {
    'isEndCustomer': False,
    'throwEslogErrors': True,
    'ipAddress': 'string',
    'fatturaPaChannelId': 'string',
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  '_furs': {
    'eor': 'string',
    'zoi': 'string',
    'qr': 'string',
    'businessPremiseId': 'string',
    'electronicDeviceId': 'string',
    'invoiceNumber': 42,
    'strategy': 'string',
    'operatorTaxNumber': 'string',
    'omitOperatorTaxNumber': False,
    'operatorLabel': 'string',
    'foreignOperator': False,
    'iteration': 0,
    'printCount': 0,
    'environment': 'production',
    'payload': {},
    'accountId': 'string'
  },
  '_at': {
    'hash': 'string',
    'previousDocumentId': 'string',
    'accountId': 'string',
    'atcudSeriesId': 'string'
  },
  '_fina': {
    'JIR': 'string',
    'ZKI': 'string',
    'businessPremiseId': 'string',
    'electronicDeviceId': 'string',
    'invoiceNumber': 42,
    'strategy': 'string',
    'operatorTaxNumber': 'string',
    'operatorLabel': 'string',
    'paymentType': 'string',
    'environment': 'production',
    'payload': {},
    'accountId': 'string'
  },
  '_documentConversionRate': {
    'dualCurrency': True,
    'from': 'string',
    'to': 'string',
    'rate': 42,
    'date': '2022-04-20T10:10:30+00:00Z',
    'source': 'string'
  },
  'unitId': 'string',
  '_documentUnit': {
    'name': 'string',
    'address': 'string',
    'address2': 'string',
    'city': 'string',
    'zip': 'string',
    'state': 'string',
    'country': 'string',
    'countryAlpha2Code': 'string',
    'taxNumber': 'string',
    'taxSubject': True,
    'companyNumber': 'string',
    'IBAN': 'string',
    'bank': 'string',
    'SWIFT': 'string',
    'website': 'string',
    'email': 'string',
    'phone': 'string',
    'businessType': 'string',
    'custom': {},
    '_data': [{
      'name': 'string',
      'value': {},
      'options': {}
    }]
  },
  'priceListId': 'string',
  'warehouseId': 'string',
  'destinationWarehouseId': 'string',
  '_data': [{
    'name': 'string',
    'value': {},
    'options': {}
  }],
  '_bPay': {
    'billerCode': 'string',
    'reference': 'string',
    'hidden': True
  }
}
response = requests.patch(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "_fatturaPa": {},
  "number": "string",
  "previousDocumentId": "string",
  "draft": false,
  "date": "2022-04-20T10:10:30+00:00Z",
  "dateService": "2022-04-20T10:10:30+00:00Z",
  "dateServiceTo": "2022-04-20T10:10:30+00:00Z",
  "dateDue": "2022-04-20T10:10:30+00:00Z",
  "dateValidTill": "2022-04-20T10:10:30+00:00Z",
  "datePaid": "2022-04-20T10:10:30+00:00Z",
  "dateReceived": "2022-04-20T10:10:30+00:00Z",
  "reference": "string",
  "total": 42,
  "totalConverted": 42,
  "totalDiscount": 42,
  "totalWithTax": 42,
  "totalWithTaxConverted": 42,
  "decimalPlaces": 4,
  "note": "string",
  "taxClause": "string",
  "omitTaxes": true,
  "keepPricesAsGross": true,
  "ignoreOmitTaxes": true,
  "footer": "string",
  "signature": "string",
  "type": "invoice",
  "displayName": "string",
  "canceled": false,
  "sentSnailMail": false,
  "totalPaid": 0,
  "totalDue": 0,
  "paidInFull": false,
  "currencyId": "string",
  "_documentTaxes": [{}],
  "_documentReverseTaxes": [{}],
  "hasUnit": true,
  "validateEslog": true,
  "isValidEslog": true,
  "uniqueId": "string",
  "customTotals": true,
  "incoming": false,
  "numberInternal": "string",
  "equalization": 42,
  "issuedAt": "2022-04-20T10:10:30+00:00Z",
  "shareableId": "string",
  "chargesDisabled": true,
  "dateYear": 42,
  "id": "string",
  "documentIds": ["string"],
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z",
  "custom": {},
  "l10n": {},
  "deletedAt": "2022-04-20T10:10:30+00:00Z",
  "_isDeleted": false,
  "deletedId": "string",
  "_documentItems": [{
    "id": "string",
    "discount": 42,
    "discountIsAmount": false,
    "quantity": 42,
    "total": 42,
    "totalWithTax": 42,
    "totalTax": 42,
    "totalDiscount": 42,
    "isSeparator": false,
    "name": "string",
    "description": "",
    "price": 42,
    "priceGross": 42,
    "unit": "string",
    "SKU": "string",
    "EAN": "string",
    "trackInventory": true,
    "onBehalf": "string",
    "itemId": "string",
    "custom": {},
    "l10n": {},
    "_documentItemTaxes": [{
      "id": "string",
      "rate": 42,
      "reverseCharged": false,
      "name": "string",
      "abbreviation": "string",
      "recoverable": true,
      "compound": false,
      "taxNumber": "string",
      "taxId": "string"
    }],
    "_components": [{
      "id": "string",
      "amount": 42,
      "itemId": "string",
      "custom": {}
    }],
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  }],
  "_documentIssuer": {
    "id": "string",
    "throwEslogErrors": true,
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "clientId": "string",
  "_documentClient": {
    "id": "string",
    "isEndCustomer": false,
    "throwEslogErrors": true,
    "ipAddress": "string",
    "fatturaPaChannelId": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "organizationId": "string",
  "accountId": "string",
  "_comments": [{
    "id": "string",
    "text": "string",
    "accountId": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z"
  }],
  "_furs": {
    "eor": "string",
    "zoi": "string",
    "qr": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "omitOperatorTaxNumber": false,
    "operatorLabel": "string",
    "foreignOperator": false,
    "iteration": 0,
    "printCount": 0,
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_at": {
    "hash": "string",
    "previousDocumentId": "string",
    "id": "string",
    "accountId": "string",
    "atcudSeriesId": "string"
  },
  "_fina": {
    "JIR": "string",
    "ZKI": "string",
    "businessPremiseId": "string",
    "electronicDeviceId": "string",
    "invoiceNumber": 42,
    "strategy": "string",
    "operatorTaxNumber": "string",
    "operatorLabel": "string",
    "paymentType": "string",
    "environment": "production",
    "payload": {},
    "id": "string",
    "accountId": "string"
  },
  "_documentConversionRate": {
    "id": "string",
    "dualCurrency": true,
    "from": "string",
    "to": "string",
    "rate": 42,
    "date": "2022-04-20T10:10:30+00:00Z",
    "source": "string"
  },
  "unitId": "string",
  "_documentUnit": {
    "id": "string",
    "name": "string",
    "address": "string",
    "address2": "string",
    "city": "string",
    "zip": "string",
    "state": "string",
    "country": "string",
    "countryAlpha2Code": "string",
    "taxNumber": "string",
    "taxSubject": true,
    "companyNumber": "string",
    "IBAN": "string",
    "bank": "string",
    "SWIFT": "string",
    "website": "string",
    "email": "string",
    "phone": "string",
    "businessType": "string",
    "createdAt": "2022-04-20T10:10:30+00:00Z",
    "updatedAt": "2022-04-20T10:10:30+00:00Z",
    "custom": {},
    "_data": [{
      "id": "string",
      "name": "string",
      "value": {},
      "options": {}
    }]
  },
  "priceListId": "string",
  "warehouseId": "string",
  "destinationWarehouseId": "string",
  "_data": [{
    "id": "string",
    "name": "string",
    "value": {},
    "options": {}
  }],
  "_bPay": {
    "billerCode": "string",
    "reference": "string",
    "hidden": true,
    "id": "string"
  }
}    
  

Delete Document

DELETE /v1/Documents/:id

Parameters

Path
  • id string required

    Model id

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{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/Documents/{id} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{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
}    
  

Send a Document

POST /v1/Documents/:id/send

Parameters

Path
  • id string required

    Document id

Query
  • l string optional

    Language flag

Properties

  • recipients string required

    Comma delimited list of emails

  • message string optional

  • subject string optional

  • sendCopy boolean optional

    Indicates if copy should be sent to sender

  • associateEmail boolean optional

    Indicates if email should be saved to client

  • Additional propertiesExpand all
      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/send', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    recipients: 'string',
    message: 'string',
    subject: 'string',
    sendCopy: true,
    associateEmail: true,
    excludedAttachmentIds: 'string',
    sendEslogAttachment: true
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/{id}/send \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "recipients": "string", \
    "message": "string", \
    "subject": "string", \
    "sendCopy": true, \
    "associateEmail": true, \
    "excludedAttachmentIds": "string", \
    "sendEslogAttachment": true
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}/send'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  'recipients': 'string',
  'message': 'string',
  'subject': 'string',
  'sendCopy': True,
  'associateEmail': True,
  'excludedAttachmentIds': 'string',
  'sendEslogAttachment': True
}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "success": true
}    
  

Download PDFs

GET /v1/Documents/:id/pdf

Parameters

Path
  • id string required

    Document id

Query
  • l string optional

    Language flag

  • upn_qr boolean optional

    Add UPN QR to PDF

  • hide_header_footer boolean optional

    Hide header and footer on PDF

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/pdf', {
  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/Documents/{id}/pdf \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {

}    
  

Cancel Document

POST /v1/Documents/:id/cancel

Parameters

Path
  • id string required

    Document id

Query
  • technical boolean optional

Properties

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/cancel', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({

  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/{id}/cancel \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{

  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}/cancel'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {

}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "success": true
}    
  

Uncancel Document

POST /v1/Documents/:id/uncancel

Parameters

Path
  • id string required

    Document id

Properties

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/uncancel', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({

  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/{id}/uncancel \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{

  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}/uncancel'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {

}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "success": true
}    
  

Fiscally verify Document

Fiscally verify document, only works in combination with Fiscal verification.

POST /v1/Documents/:id/fiscally-verify

Parameters

Path
  • id string required

    Document id

Query
  • provider string optional

  • old boolean optional

Properties

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/fiscally-verify', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({

  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/{id}/fiscally-verify \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{

  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}/fiscally-verify'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {

}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {

}    
  

Mark Document as sent

POST /v1/Documents/:id/mark-sent

Parameters

Path
  • id string required

    Document id

Properties

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/mark-sent', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({

  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/{id}/mark-sent \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{

  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}/mark-sent'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {

}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "success": true
}    
  

Upload Attachment

POST /v1/Documents/:id/attachments/upload

Parameters

Path
  • id string required

    Document id

Properties

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/attachments/upload', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({

  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/{id}/attachments/upload \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{

  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}/attachments/upload'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {

}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {

}    
  

Download XML in E-slog formats

GET /v1/Documents/:id/e-slog

Parameters

Path
  • id string required

    Document id

Query
  • options string optional

    Additional settings for generating the eslog format

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/e-slog', {
  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/Documents/{id}/e-slog \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {

}    
  

Parse to XML

Parse XML to Document structure

POST /v1/Documents/parse-xml

Properties

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/parse-xml', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({

  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/parse-xml \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{

  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/parse-xml'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {

}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {

}    
  

Share Document

Make document shareable. Returns a shareableId which can be used to view the invoice online.

POST /v1/Documents/:id/share

Parameters

Path
  • id string required

    Document id

Properties

  • regenerate boolean optional

    Regenerate shareable id

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/share', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    regenerate: true
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/{id}/share \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "regenerate": true
  }'        
      

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {
  "shareableId": "string"
}    
  

Get Document

GET /v1/Documents/public/:id

Parameters

Path
  • id string required

    Shareable id of document to retrieve

Query
  • filter string optional

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

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

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

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {

}    
  

Download XML in E-slog formats

GET /v1/Documents/public/:id/e-slog

Parameters

Path
  • id string required

    Shareable id of document to retrieve

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

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/Documents/public/{id}/e-slog \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {

}    
  

Download PDFs

GET /v1/Documents/public/:id/pdf

Parameters

Path
  • id string required

    Shareable id of document to retrieve

Query
  • l string optional

    Language flag

  • upn_qr boolean optional

    Add UPN QR to PDF

  • hide_header_footer boolean optional

    Hide header and footer on PDF

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

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/Documents/public/{id}/pdf \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {

}    
  

Download Attachments

GET /v1/Documents/public/:id/attachments/:attachmentId/download

Parameters

Path
  • id string required

    Shareable id of document to retrieve

  • attachmentId string required

    Id of attachment to retrieve

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/public/{id}/attachments/{attachmentId}/download', {
  method: 'GET',
  headers: {
    'content-type': 'application/json'
  }
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X GET https://api.spaceinvoices.com/v1/Documents/public/{id}/attachments/{attachmentId}/download \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/public/{id}/attachments/{attachmentId}/download'
headers = {
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {

}    
  

Check is unique Documents number

GET /v1/Organizations/:id/is-unique-doc-number

Parameters

Path
  • id string required

    Organization id

Query
  • number string required

    The numberTax subject to check

  • type string required

    The type of document

  • ignoreId string optional

    Id of document to ignore. Used when editing a document.

  • incoming boolean optional

    Check incoming documents.

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/is-unique-doc-number', {
  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}/is-unique-doc-number \
  -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}/is-unique-doc-number'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "unique": true
}    
  

Get last Documents number

GET /v1/Organizations/:id/last-doc-number

Parameters

Path
  • id string required

    Organization id

Query
  • type string required

    The type of document

  • incoming boolean optional

    Incoming document

  • date date optional

    Date if not in current year

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/last-doc-number', {
  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}/last-doc-number \
  -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}/last-doc-number'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "number": "string"
}    
  

Get next Documents number

GET /v1/Organizations/:id/next-doc-number

Parameters

Path
  • id string required

    Organization id

Query
  • type string required

    The type of document

  • incoming boolean optional

    Incoming document

  • fvStrategy string optional

    Fiscal verification strategy

  • BPid string optional

    Business premise ID

  • EDid string optional

    Electronic device ID

  • date date optional

    Date if not in current year

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/next-doc-number', {
  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}/next-doc-number \
  -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}/next-doc-number'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
response = requests.get(url, params={}, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "number": "string"
}    
  

Parse image to Document

Parse image to Document structure

POST /v1/Organizations/:id/documents/parse-image

Parameters

Path
  • id string required

    Organization id

Query
  • mobile boolean optional

    Is image made by mobile phone.

Properties

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Organizations/{id}/documents/parse-image', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({

  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Organizations/{id}/documents/parse-image \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{

  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Organizations/{id}/documents/parse-image'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {

}
response = requests.post(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {

}    
  

Create Comment

POST /v1/Documents/:id/comments

Parameters

Path
  • id string required

    Document id

Properties

  • text string required

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/comments', {
  method: 'POST',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    text: 'string'
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X POST https://api.spaceinvoices.com/v1/Documents/{id}/comments \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "text": "string"
  }'        
      

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {
  "id": "string",
  "text": "string",
  "accountId": "string",
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z"
}    
  

Replace Comment

PUT /v1/Documents/:id/comments/:fk

Parameters

Path
  • id string required

    Document id

  • fk string required

    Foreign key for comments

Properties

  • text string required

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/comments/{fk}', {
  method: 'PUT',
  headers: {
    'Authorization': 'ACCESS_TOKEN',
    'content-type': 'application/json'
  },
  body: JSON.stringify({
    text: 'string'
  })
});      
    

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

        
          curl -X PUT https://api.spaceinvoices.com/v1/Documents/{id}/comments/{fk} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "text": "string"
  }'        
      

Your access token displayed in examples.

        
          import requests
url = 'https://api.spaceinvoices.com/v1/Documents/{id}/comments/{fk}'
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'content-type': 'application/json',
}
params = {
  'text': 'string'
}
response = requests.put(url, json=params, headers=headers)        
      

Your access token displayed in examples.

Response:

    
      {
  "id": "string",
  "text": "string",
  "accountId": "string",
  "createdAt": "2022-04-20T10:10:30+00:00Z",
  "updatedAt": "2022-04-20T10:10:30+00:00Z"
}    
  

Delete Comment

DELETE /v1/Documents/:id/comments/:fk

Parameters

Path
  • id string required

    Document id

  • fk string required

    Foreign key for comments

      
        const response = await fetch('https://api.spaceinvoices.com/v1/Documents/{id}/comments/{fk}', {
  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/Documents/{id}/comments/{fk} \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        
      

Your access token displayed in examples.

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

Your access token displayed in examples.

Response:

    
      {

}