Usage

Create Usage

post
Authorizations
Header parameters
api-versionstringOptional
younium-idempotency-keystringOptional
younium-idempotency-durationInHoursintegerOptional
Body
all ofOptional
Responses
201
Created
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-06-23T09:23:02.068Z",
  "toDate": "2025-06-23T09:23:02.068Z",
  "source": "text",
  "ratedPrice": 1,
  "ratedPriceCurrency": "text",
  "customFields": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "validateData": true
}

No content

Get Usage

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
get
GET /Usage HTTP/1.1
Host: api.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
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",
      "description": "text",
      "fromDate": "2025-06-23T09:23:02.068Z",
      "toDate": "2025-06-23T09:23:02.068Z",
      "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-06-23T09:23:02.068Z",
      "processed": true,
      "ratedPrice": 1,
      "ratedPriceCurrencyCode": "text",
      "customFields": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "created": "2025-06-23T09:23:02.068Z",
      "modified": "2025-06-23T09:23:02.068Z"
    }
  ]
}

Update Usage

patch
Authorizations
Path parameters
idstring · uuidRequired
Header parameters
api-versionstringOptional
Body
all ofOptional
Responses
204
No Content
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-06-23T09:23:02.068Z",
  "ratedPrice": 1,
  "ratedPriceCurrency": "text",
  "customFields": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

No content

Delete Usage

delete
Authorizations
Path parameters
idstring · uuidRequired
Header parameters
api-versionstringOptional
Responses
200
Success
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
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-06-23T09:23:02.068Z",
  "toDate": "2025-06-23T09:23:02.068Z",
  "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-06-23T09:23:02.068Z",
  "processed": true,
  "ratedPrice": 1,
  "ratedPriceCurrencyCode": "text",
  "customFields": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "created": "2025-06-23T09:23:02.068Z",
  "modified": "2025-06-23T09:23:02.068Z"
}

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
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": []
}

Last updated

Was this helpful?