CostCodesResource


Create a cost code


Create a new cost code. To set initial prices for currencies, add currencyPrices in the cost code entity

POST https://example.com/api/config/costcodes

Roles : [ROLE_PRICING_MANAGE]

Content-Type : costcode Accept : costcode

Error Codes

  • COSTCODE-2 - Duplicate name for cost code

Example

List cost codes


This method returns the list of cost codes in the platform.

GET https://example.com/api/config/costcodes

Roles : [ROLE_PRICING_VIEW, ROLE_APPLIB_VM_COST_CODE, ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String name Order by
has String If present filter to apply in the search.
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : costcodes

Example

Delete a cost code


Remove an existing cost code and its associated currencyPrices from the platform

DELETE https://example.com/api/config/costcodes/{costcode}

Roles : [ROLE_PRICING_MANAGE]

Example

Get a cost code


Get a cost code and the currencyPrices associated with that cost code.

GET https://example.com/api/config/costcodes/{costcode}

Roles : [ROLE_PRICING_VIEW]

Accept : costcode

Error Codes

  • COSTCODE-0 - The requested cost code does not exist

Example

Modify a cost code


Edit an existing cost code and update currencyPrices if they are included in the cost code entity

PUT https://example.com/api/config/costcodes/{costcode}

Roles : [ROLE_PRICING_MANAGE]

Content-Type : costcode Accept : costcode

Error Codes

  • COSTCODE-0 - The requested cost code does not exist

Example