Microservice generating sequence numbers for CRM resources
Add the following snippet to your docker-compose.yml to include the sequence numbers service in your project.
sequence-numbers:
image: rollvolet/crm-sequence-numbers-serviceFetch the next sequence number for a resource of a given type.
The request body contains the resource type for which a next sequence number must be generated and optionally some additional scope.
Possible values for resource-type are:
http://data.rollvolet.be/vocabularies/crm/Requesthttp://data.rollvolet.be/vocabularies/crm/Interventionhttp://schema.org/Offerhttps://purl.org/p2p-o/document#E-Invoicehttp://www.w3.org/2006/vcard/ns#Vcardhttp://www.semanticdesktop.org/ontologies/2007/03/22/nco#Contacthttps://data.vlaanderen.be/ns/gebouw#Gebouw
{
"data": {
"type": "sequence-numbers",
"attributes": {
"resource-type": "http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Contact",
"scope": "http://data.rollvolet.be/customers/d01a9a2b-ace9-443e-8dab-cebcb81ec294"
}
}
}201 Createdwith the generated number in thenumberattribute of the JSON response400 Bad Requestifresource-type(or in some casesscope) is missing in the request body