API endpoints > rules
Use this endpoint to manage all rules in the system.
The system uses different types of rules, called rulebooks. Each rulebook has a specific use:
- Shipment rules. These rules are used when a shipment is imported via the POST /shipment endpoint.
- Shop checkout service rules. These rules are set up to 'translate' the services in the e-commerce platform to a specific carrier and service. This 'translation' happens after the data is fetched from the platform and before the shipment is sent to our API shipment endpoint, where the shipment rules are applied.
- Checkout rules. These rules are used in the e-commerce checkout to determine what options will be displayed.
Rule numbering
The rulenumbers are primarily used to sort the rules. This is the order in which the rules will be executed. This way, the rule parsing and execution will always be in the same order as was designed and result in a predictable easy to follow result.
GET | /rules/ |
GET | /rules/rulebook/:rulebookTypeId |
GET | /rules/fetchtypetables/ |
POST | /rules/rulebook/:rulebookTypeId |
POST | /rules/rule/:rulebookTypeId |
PATCH | /rules/rule/:rulebookTypeId |
DELETE | /rules/rule/:rulebookTypeId/:::ruleNumber |
ID number Rulebook type 1 Shipment rules 2 Shop checkout service rules 3 Checkout rules