cURL
curl --request POST \ --url https://commerce.driv.ly/api/documents \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "updatedAt": "<string>", "createdAt": "<string>", "name": "<string>", "email": "<string>", "notes": "<string>", "attachments": "<string>", "createdBy": 123 } '
{ "doc": { "updatedAt": "<string>", "createdAt": "<string>", "name": "<string>", "email": "<string>", "notes": "<string>", "attachments": "<string>", "createdBy": 123 }, "message": "<string>" }
Create a new Document
Usage with the Drivly SDK
import { SDK } from '@drivly/commerce' import type { documents } from '@drivly/commerce' const sdk = new SDK(...) const documents = await sdk.documents.create(data: documents): Promise<documents>
number of levels to automatically populate relationships and uploads
retrieves document(s) in a specific locale
specifies a fallback locale if no locale value exists
ok
Show child attributes