Younium Developer Portal
  • Welcome
  • Get started
  • 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
  • Documentation
    • Developer resources
    • Invoice operations
    • Product guide
    • Webhooks
    • Idempotent requests
  • Sandbox
Powered by GitBook
On this page

Was this helpful?

  1. API:s
  2. API 2.0

Usage

PreviousUnitofmeasurementsNextWebhooks

Last updated 7 months ago

Was this helpful?


Delete Usage

delete
Authorizations
Path parameters
idstring ยท uuidRequired
Header parameters
api-versionstringOptional
Responses
200
Success
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
404
Not Found
application/json
delete
DELETE /Usage/{id} HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Get Usage 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 /Usage/{id} HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "description": "text",
  "fromDate": "2025-05-28T20:25:22.660Z",
  "toDate": "2025-05-28T20:25:22.660Z",
  "quantity": 1,
  "unit": "text",
  "source": "text",
  "account": {
    "name": "text",
    "accountNumber": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "externalERPId": "text",
    "externalCRMId": "text"
  },
  "order": {
    "orderNumber": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "externalERPId": "text",
    "externalCRMId": "text"
  },
  "product": {
    "description": "text",
    "productNumber": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "externalERPId": "text",
    "externalCRMId": "text"
  },
  "charge": {
    "name": "text",
    "chargeNumber": "OPC-000001",
    "description": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "externalERPId": "text",
    "externalCRMId": "text"
  },
  "importDate": "2025-05-28T20:25:22.660Z",
  "processed": true,
  "ratedPrice": 1,
  "ratedPriceCurrencyCode": "text",
  "customFields": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "created": "2025-05-28T20:25:22.660Z",
  "modified": "2025-05-28T20:25:22.660Z"
}
  • POSTCreate Usage
  • GET/Usage
  • PATCHUpdate Usage
  • DELETEDelete Usage
  • GETGet Usage by Id
  • POSTImport Usage
get
Authorizations
Query parameters
Skipinteger ยท int32Optional

Skip number of records

Example: 10
Takeinteger ยท int32Optional

Take number of records

Example: 5
FilterstringOptional

Filter the resulsts. See ODATA documentation for more information

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

Sorting the results. See ODATA specificaion for more information

Example: name
Header parameters
api-versionstringOptional
Responses
200
Success
application/json
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
get
GET /Usage HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "description": "text",
    "fromDate": "2025-05-28T20:25:22.660Z",
    "toDate": "2025-05-28T20:25:22.660Z",
    "quantity": 1,
    "unit": "text",
    "source": "text",
    "account": {
      "name": "text",
      "accountNumber": "text",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "externalERPId": "text",
      "externalCRMId": "text"
    },
    "order": {
      "orderNumber": "text",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "externalERPId": "text",
      "externalCRMId": "text"
    },
    "product": {
      "description": "text",
      "productNumber": "text",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "externalERPId": "text",
      "externalCRMId": "text"
    },
    "charge": {
      "name": "text",
      "chargeNumber": "OPC-000001",
      "description": "text",
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "externalERPId": "text",
      "externalCRMId": "text"
    },
    "importDate": "2025-05-28T20:25:22.660Z",
    "processed": true,
    "ratedPrice": 1,
    "ratedPriceCurrencyCode": "text",
    "customFields": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "created": "2025-05-28T20:25:22.660Z",
    "modified": "2025-05-28T20:25:22.660Z"
  }
]

Create Usage

post
Authorizations
Header parameters
api-versionstringOptional
younium-idempotency-keystringOptional
younium-idempotency-durationInHoursintegerOptional
Body
all ofOptional
Responses
201
Created
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
post
POST /Usage HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 339

{
  "account": "A-000001",
  "order": "O-000001",
  "product": "OP-000001",
  "charge": "OPC-000001",
  "unit": "pcs",
  "quantity": 1,
  "description": "text",
  "fromDate": "2025-05-28T20:25:22.660Z",
  "toDate": "2025-05-28T20:25:22.660Z",
  "source": "text",
  "ratedPrice": 1,
  "ratedPriceCurrency": "text",
  "customFields": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "validateData": true
}

No content

Update Usage

patch
Authorizations
Path parameters
idstring ยท uuidRequired
Header parameters
api-versionstringOptional
Body
all ofOptional
Responses
204
No Content
400
Bad Request.
application/json
401
Unauthorized
403
Forbidden
404
Not Found
application/json
patch
PATCH /Usage/{id} HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/merge-patch+json
Accept: */*
Content-Length: 183

{
  "unit": "pcs",
  "quantity": 1,
  "description": "text",
  "fromDate": "2025-05-28T20:25:22.660Z",
  "ratedPrice": 1,
  "ratedPriceCurrency": "text",
  "customFields": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

No content

Import Usage

post

Import Usage Data in csv or json format.

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 /Usage/import HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 215

{
  "mappingTemplateName": "text",
  "dateFormat": "text",
  "decimalSeparator": "text",
  "dataFormat": "text",
  "batchName": "text",
  "data": null,
  "usePreprocessingRules": true,
  "allowDuplicateEntries": true,
  "breakOnValidationError": true
}
{
  "importDataType": "text",
  "batchId": "123e4567-e89b-12d3-a456-426614174000",
  "hasErrors": true,
  "errors": []
}