Sandbox Portal
  • README
  • API:s
    • API 2.0
      • Accounts
      • Bookings
      • Chartofaccounts
      • Countries
      • Currency
      • Documenttemplate
      • Exchangerate
      • Invoices
      • Journals
      • Measurements
      • Orders
      • Paymentterms
      • Products
      • Quotes
      • Salesorders
      • Simpleproducts
      • Subscriptions
      • Taxtemplates
      • Unitofmeasurements
      • Usage
      • Webhooks
    • API 2.1
      • Accounts
      • Bookings
      • Chartofaccounts
      • Countries
      • Currency
      • Customfieldconfigurations
      • Documenttemplate
      • Exchangerate
      • Invoicebatches
      • Invoicebatchgroups
      • Invoices
      • Journals
      • Measurements
      • Orders
      • Payments
      • Paymentterms
      • Products
      • Quotes
      • Reports
      • Revenueschedule
      • Salesorders
      • Simpleproducts
      • Subscriptions
      • Taxtemplates
      • Unitofmeasurements
      • Usage
      • Webhooks
  • Back to Developer Portal
Powered by GitBook
On this page
  1. API:s
  2. API 2.1

Invoicebatches

PreviousExchangerateNextInvoicebatchgroups

Last updated 6 months ago


Get Invoice Batch Log by Id or Reference

get
Authorizations
Path parameters
batchIdentifierstringRequired
Query parameters
FilterstringOptional

Filter the results. See ODATA documentation for more information

Example: name eq 'Adam' and age gt 20
OrderBystringOptional

Sorting the results. See ODATA specification for more information

Example: accountNumber Desc
ModifiedAfterstring · date-timeOptional

Apply a separate modified After filter. See 'ModifiedBefore' filter for further details.

Example: 03/01/2025 00:00:00
ModifiedBeforestring · date-timeOptional

Apply a separate filter to only get records that has been modified Before the specified date time.

Example: 03/01/2025 00:00:00
PageSizeinteger · int32Optional

Page Size

Example: 20
PageNumberinteger · int32Optional

Page Number

Example: 1
Header parameters
api-versionstringOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
get
GET /InvoiceBatches/{batchIdentifier}/BatchLog HTTP/1.1
Host: api.sandbox.younium.com
Accept: */*
{
  "pageNumber": 1,
  "pageSize": 1,
  "totalPages": 1,
  "totalCount": 1,
  "nextPage": "https://example.com",
  "previousPage": "https://example.com",
  "firstPage": "https://example.com",
  "lastPage": "https://example.com",
  "data": {
    "entityId": "123e4567-e89b-12d3-a456-426614174000",
    "errorMessage": "text",
    "reference": "text",
    "entityName": "text",
    "created": "2025-05-22T02:14:28.973Z",
    "modified": "2025-05-22T02:14:28.973Z"
  }
}

Get status on generate invoice batch job.

get
Authorizations
Path parameters
batchReferencestringRequired

Accepted references job id, batch id, batch number or event id

Header parameters
api-versionstringOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
get
GET /InvoiceBatches/BatchJobStatus/{batchReference}/Generated HTTP/1.1
Host: api.sandbox.younium.com
Accept: */*
{
  "resultBody": {
    "batchId": "123e4567-e89b-12d3-a456-426614174000",
    "batchNumber": "text",
    "eventId": "text",
    "message": "text"
  },
  "resultStatus": "Pending",
  "statusMessage": "text"
}

Get status on posted invoice batch job.

get
Authorizations
Path parameters
batchReferencestringRequired

Accepted references job id, batch id, batch number or event id

Header parameters
api-versionstringOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
get
GET /InvoiceBatches/BatchJobStatus/{batchReference}/Posted HTTP/1.1
Host: api.sandbox.younium.com
Accept: */*
{
  "resultBody": [
    {
      "batchId": "123e4567-e89b-12d3-a456-426614174000",
      "batchNumber": "text",
      "eventId": "text",
      "message": "text"
    }
  ],
  "resultStatus": "Pending",
  "statusMessage": "text"
}

Get InvoiceBatches

get
Authorizations
Query parameters
FilterstringOptional

Filter the results. See ODATA documentation for more information

Example: name eq 'Adam' and age gt 20
OrderBystringOptional

Sorting the results. See ODATA specification for more information

Example: accountNumber Desc
ModifiedAfterstring · date-timeOptional

Apply a separate modified After filter. See 'ModifiedBefore' filter for further details.

Example: 03/01/2025 00:00:00
ModifiedBeforestring · date-timeOptional

Apply a separate filter to only get records that has been modified Before the specified date time.

Example: 03/01/2025 00:00:00
PageSizeinteger · int32Optional

Page Size

Example: 20
PageNumberinteger · int32Optional

Page Number

Example: 1
Header parameters
api-versionstringOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
get
GET /InvoiceBatches HTTP/1.1
Host: api.sandbox.younium.com
Accept: */*
{
  "pageNumber": 1,
  "pageSize": 1,
  "totalPages": 1,
  "totalCount": 1,
  "nextPage": "https://example.com",
  "previousPage": "https://example.com",
  "firstPage": "https://example.com",
  "lastPage": "https://example.com",
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "batchNumber": "text",
      "targetDate": "2025-05-22T02:14:28.973Z",
      "invoiceDate": "2025-05-22T02:14:28.973Z",
      "batchGroups": [
        "text"
      ],
      "invoices": [
        {
          "invoiceNumber": "text",
          "status": "Draft",
          "invoiceDate": "2025-05-22T02:14:28.973Z",
          "currency": "text",
          "subtotal": 1,
          "totalAmount": 1,
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "externalERPId": "text",
          "externalCRMId": "text"
        }
      ],
      "batchLog": [
        {
          "entityId": "123e4567-e89b-12d3-a456-426614174000",
          "errorMessage": "text",
          "reference": "text",
          "entityName": "text",
          "created": "2025-05-22T02:14:28.973Z",
          "modified": "2025-05-22T02:14:28.973Z"
        }
      ],
      "created": "2025-05-22T02:14:28.973Z",
      "modified": "2025-05-22T02:14:28.973Z"
    }
  ]
}

Get InvoiceBatches by Id

get
Authorizations
Path parameters
idstring · uuidRequired
Header parameters
api-versionstringOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
404
Not Found
application/json
get
GET /InvoiceBatches/{id} HTTP/1.1
Host: api.sandbox.younium.com
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "batchNumber": "text",
  "targetDate": "2025-05-22T02:14:28.973Z",
  "invoiceDate": "2025-05-22T02:14:28.973Z",
  "batchGroups": [
    "text"
  ],
  "invoices": [
    {
      "invoiceNumber": "text",
      "status": "Draft",
      "invoiceDate": "2025-05-22T02:14:28.973Z",
      "currency": "text",
      "subtotal": 1,
      "totalAmount": 1,
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "externalERPId": "text",
      "externalCRMId": "text"
    }
  ],
  "batchLog": [
    {
      "entityId": "123e4567-e89b-12d3-a456-426614174000",
      "errorMessage": "text",
      "reference": "text",
      "entityName": "text",
      "created": "2025-05-22T02:14:28.973Z",
      "modified": "2025-05-22T02:14:28.973Z"
    }
  ],
  "created": "2025-05-22T02:14:28.973Z",
  "modified": "2025-05-22T02:14:28.973Z"
}
  • GETGet Invoice Batch Log by Id or Reference
  • GETGet status on generate invoice batch job.
  • GETGet status on posted invoice batch job.
  • POSTGenerate Invoice Batch
  • GETGet InvoiceBatches
  • POSTPost Invoice Batch
  • GETGet InvoiceBatches by Id

Generate Invoice Batch

post

Generate invoice batch by running generate invoice batch job. Status on jobs can obtained by batch jobs status endpoints or found in settings > scheduled jobs in the UI.

Authorizations
Header parameters
api-versionstringOptional
younium-idempotency-keystringOptional
younium-idempotency-durationInHoursintegerOptional
Body
all ofOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
post
POST /InvoiceBatches HTTP/1.1
Host: api.sandbox.younium.com
Content-Type: application/json
Accept: */*
Content-Length: 563

{
  "invoiceDate": "2025-05-22T02:14:28.973Z",
  "customizedTargetDates": {
    "oneOff": "2025-05-22T02:14:28.973Z",
    "recurringInAdvance": "2025-05-22T02:14:28.973Z",
    "recurringInArrears": "2025-05-22T02:14:28.973Z",
    "usage": "2025-05-22T02:14:28.973Z",
    "measured": "2025-05-22T02:14:28.973Z"
  },
  "targetDate": "2025-05-22T02:14:28.973Z",
  "invoiceAllAccounts": true,
  "invoiceAllBatchGroups": true,
  "accounts": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "invoiceBatchGroups": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "minimumInvoiceAmount": 1,
  "ensureWebhooksAreEnabled": true,
  "jobDescription": "text"
}
{
  "batchNumber": "text",
  "jobId": "123e4567-e89b-12d3-a456-426614174000",
  "resultStatus": "Pending",
  "webhooksTriggeredWhenCompleted": true,
  "webhookEvent": "text",
  "webhooks": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "description": "text"
    }
  ],
  "eventId": "text",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "message": "text"
}

Post Invoice Batch

post

Post invoice batch by running post invoice batch job. Status on jobs can obtained by batch jobs status endpoints or found in settings > scheduled jobs in the UI

Authorizations
Path parameters
idstring · uuidRequired
Header parameters
api-versionstringOptional
younium-idempotency-keystringOptional
younium-idempotency-durationInHoursintegerOptional
Body
all ofOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
post
POST /InvoiceBatches/{id}/Post HTTP/1.1
Host: api.sandbox.younium.com
Content-Type: application/json
Accept: */*
Content-Length: 57

{
  "ensureWebhooksAreEnabled": true,
  "jobDescription": "text"
}
{
  "batchNumber": "text",
  "jobId": "123e4567-e89b-12d3-a456-426614174000",
  "resultStatus": "Pending",
  "webhooksTriggeredWhenCompleted": true,
  "webhookEvent": "text",
  "webhooks": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "description": "text"
    }
  ],
  "eventId": "text",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "message": "text"
}