application/json

Body

  • externalReferenceId string

    Unique identifier on the partner system.

  • supplierNumber string Required

    Unique identifier for the supplier. Must be existing in the system to create the invoice.

  • supplierName string
  • supplierOrganizationalNumber string
  • supplierBankGiro string
  • supplierPostGiro string
  • supplierInvoiceNumber string Required

    Unique identifier for the supplier invoice.

  • orderNumber string
  • projectName string
  • externalReference string

    Reference from supplier side

  • internalReference string

    Reference from the customer (Trukks customer)

  • invoiceDate number

    Epoch time in milliseconds

  • paymentDueDate number

    Epoch time in milliseconds

  • articles array[object]
    Hide articles attributes Show articles attributes object
    • articleNumber string

      Article will be created if it does not exist

    • articleDescription string
    • price number

      Unit price before discount

    • totalPrice number

      Total row price without VAT, with discount applied

    • quantity number
    • unit string
    • vat number
    • discountPercentage number

      Must be null when discountValue is set.

    • discountValue number

      Discount in invoice currency. Must be null when discountPercentage is set.

  • totalPrice number Required
  • totalVat number Required
  • centRoundoff number
  • invoiceFee number
  • currency string Required
  • paymentReferenceOCR string
  • creditInvoiceReference string
  • freight string

Responses

  • 200 application/json

    Supplier invoice successfully created

    Hide response attributes Show response attributes object
    • id string

      Trukks id for the supplier invoice. Required to attach file to invoice.

    • message string
  • 400 application/json

    Invalid input

    Hide response attributes Show response attributes object
    • traceId string

      Internal ID. Please provide this ID when contacting support

    • message string

      Message describing the error

  • 401

    Access token is missing or invalid

  • 409 application/json

    Invoice with same supplierNumber and supplierInvoiceNumber already exists

    Hide response attributes Show response attributes object
    • traceId string

      Internal ID. Please provide this ID when contacting support

    • message string

      Message describing the error

  • 500 application/json

    Internal error

    Hide response attributes Show response attributes object
    • traceId string

      Internal ID. Please provide this ID when contacting support

    • message string

      Message describing the error

POST /supplierinvoices
curl \
 --request POST 'https://partner.trukks.se/supplierinvoices/supplierinvoices' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"externalReferenceId":"string","supplierNumber":"string","supplierName":"string","supplierOrganizationalNumber":"string","supplierBankGiro":"string","supplierPostGiro":"string","supplierInvoiceNumber":"string","orderNumber":"string","projectName":"string","externalReference":"string","internalReference":"string","invoiceDate":42.0,"paymentDueDate":42.0,"articles":[{"articleNumber":"string","articleDescription":"string","price":42.0,"totalPrice":42.0,"quantity":42.0,"unit":"string","vat":42.0,"discountPercentage":42.0,"discountValue":42.0}],"totalPrice":42.0,"totalVat":42.0,"centRoundoff":42.0,"invoiceFee":42.0,"currency":"string","paymentReferenceOCR":"string","creditInvoiceReference":"string","freight":"string"}'
Request examples
{
  "externalReferenceId": "string",
  "supplierNumber": "string",
  "supplierName": "string",
  "supplierOrganizationalNumber": "string",
  "supplierBankGiro": "string",
  "supplierPostGiro": "string",
  "supplierInvoiceNumber": "string",
  "orderNumber": "string",
  "projectName": "string",
  "externalReference": "string",
  "internalReference": "string",
  "invoiceDate": 42.0,
  "paymentDueDate": 42.0,
  "articles": [
    {
      "articleNumber": "string",
      "articleDescription": "string",
      "price": 42.0,
      "totalPrice": 42.0,
      "quantity": 42.0,
      "unit": "string",
      "vat": 42.0,
      "discountPercentage": 42.0,
      "discountValue": 42.0
    }
  ],
  "totalPrice": 42.0,
  "totalVat": 42.0,
  "centRoundoff": 42.0,
  "invoiceFee": 42.0,
  "currency": "string",
  "paymentReferenceOCR": "string",
  "creditInvoiceReference": "string",
  "freight": "string"
}
Response examples (200)
{
  "id": "string",
  "message": "string"
}
Response examples (400)
{
  "traceId": "string",
  "message": "string"
}
Response examples (409)
{
  "traceId": "string",
  "message": "string"
}
Response examples (500)
{
  "traceId": "string",
  "message": "string"
}