Create a new usage product

post/usage-products
SecuritybearerAuth
Request
Request Body schema: application/json

New usage product

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

Usage product name

nominalCode
string [ 0 .. 50 ] characters [a-zA-Z0-9\p{L}.\-_]*

Nominal code

usageProductCategoryId
required
integer <int64>

Usage product category identifier

direction
required
string (UsageProductDirection)

Usage product direction

Enum: "INBOUND" "OUTBOUND"
performLocalAndNationalCheck
boolean
Default: true

Perform local and national check

availableFrom
required
string <date>

Product is available from

availableTo
string <date>

Product is available to

productReferenceCanBeRange
boolean
Default: true

Product reference can be range

serviceIdRequired
boolean
Default: false

Service id is required on rental product inventories

Array of objects (CustomField)
Responses
200

OK

201

Created

400

Bad Request

401

Unauthorized

403

Forbidden

Request samples
application/json
{
  • "name": "string",
  • "nominalCode": "string",
  • "usageProductCategoryId": 1,
  • "direction": "INBOUND",
  • "performLocalAndNationalCheck": true,
  • "availableFrom": "2019-08-24",
  • "availableTo": "2019-08-24",
  • "productReferenceCanBeRange": true,
  • "serviceIdRequired": false,
  • "customFields": [
    • {
      • "label": "string",
      • "value": "string"
      }
    ]
}
Response samples
application/json
{
  • "id": 1,
  • "name": "string",
  • "nominalCode": "string",
  • "usageProductCategoryId": 1,
  • "direction": "INBOUND",
  • "performLocalAndNationalCheck": true,
  • "availableFrom": "2019-08-24",
  • "availableTo": "2019-08-24",
  • "productReferenceCanBeRange": true,
  • "serviceIdRequired": false,
  • "customFields": [
    • {
      • "id": 1,
      • "label": "string",
      • "value": "string"
      }
    ]
}