Create a new usage product inventory

post/usage-product-inventories
SecuritybearerAuth
Request
Request Body schema: application/json

New usage product inventory

siteId
required
integer <int64>

Site identifier

usageProductId
required
integer <int64>

Usage product identifier

startDate
required
string <date>

Start date

endDate
string <date>

End date

supplierAccountId
integer <int64>

Supplier account identifier

billByServiceId
boolean
Default: false

Bill by Service ID

serviceId
string [ 4 .. 100 ] characters ^$|[a-zA-Z0-9\p{L}\s()@&.,-_£|]{4,100}

Service ID

billable
boolean
Default: true

Billable charge

inFlightOrder
boolean
Default: false

In-flight order

externalOrderReference
string [ 1 .. 100 ] characters [\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...

external order reference

externalNetworkOrderReference
string [ 1 .. 100 ] characters [\w\p{L}\s%£@&#=':;`’,|!_—–\(\)\\/\-\+\.\?\*\...

external Network order reference

pendingEndDate
string <date>

Inflight order pending end date

usageCapEnabled
boolean
Default: false

Usage cap enabled

defaultUsageCap
number

Default usage cap amount

applySurcharges
boolean
Default: false

Do surcharge apply to this UPI? If true and a rate is found with a surchargeValue greater than 0 then an additional surcharge will be applied to the usage cost.

required
Array of objects (ProductReference) non-empty
Responses
200

OK

201

Created

400

Bad Request

401

Unauthorized

404

Not Found

412

Precondition Failed

500

Internal Server Error

501

Not Implemented Yet

Request samples
application/json
{
  • "siteId": 1,
  • "usageProductId": 1,
  • "startDate": "2019-08-24",
  • "endDate": "2019-08-24",
  • "supplierAccountId": 0,
  • "billByServiceId": false,
  • "serviceId": "string",
  • "billable": true,
  • "inFlightOrder": false,
  • "externalOrderReference": "string",
  • "externalNetworkOrderReference": "string",
  • "pendingEndDate": "2019-08-24",
  • "usageCapEnabled": false,
  • "defaultUsageCap": 0,
  • "applySurcharges": false,
  • "productReferences": [
    • {
      • "productReference": "string",
      • "primary": true,
      • "label": "string",
      • "startDate": "2019-08-24",
      • "endDate": "2019-08-24",
      • "userId": "string",
      • "userEmail": "string",
      • "costCentreCode": "string",
      • "departmentCode": "string",
      • "notes": "string"
      }
    ]
}
Response samples
application/json
{
  • "id": 1,
  • "siteId": 1,
  • "usageProductId": 1,
  • "startDate": "2019-08-24",
  • "endDate": "2019-08-24",
  • "supplierAccountId": 0,
  • "billByServiceId": false,
  • "serviceId": "string",
  • "billable": true,
  • "inFlightOrder": false,
  • "externalOrderReference": "string",
  • "externalNetworkOrderReference": "string",
  • "pendingEndDate": "2019-08-24",
  • "usageCapEnabled": false,
  • "defaultUsageCap": 0,
  • "applySurcharges": false,
  • "productReferences": [
    • {
      • "id": 1,
      • "productReference": "string",
      • "primary": true,
      • "label": "string",
      • "startDate": "2019-08-24",
      • "endDate": "2019-08-24",
      • "userId": "string",
      • "userEmail": "string",
      • "costCentreCode": "string",
      • "departmentCode": "string",
      • "notes": "string"
      }
    ]
}