Creates a work order.
Creates a work order.
<b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
To use this endpoint, select Write Work Orders under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.
Request
- Base URLhttps://api.samsara.com
- AuthHTTP bearer
Request body
Example request
{
"archivedAtTime": "2019-06-13T19:08:25Z",
"assetId": "12443",
"assignedUserId": "1234",
"attributes": [
{
"dateValues": [
"2024-01-15",
"2024-12-31"
],
"id": "494123",
"name": "Compliance/ELD",
"numberValues": [
867,
5309
],
"stringValues": [
"HQ",
"Leased"
]
}
],
"category": "PREVENTIVE",
"completedAtTime": "2019-06-13T19:08:25Z",
"createdByUserId": "1234",
"description": "The vehicle is not starting.",
"discount": {
"basisPoints": 500,
"money": {
"amount": "94.01",
"currency": "usd"
}
},
"dueAtTime": "2019-06-13T19:08:25Z",
"engineHours": 91823,
"invoiceNumber": "123456",
"items": [
{
"id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"type": "ISSUE"
}
],
"odometerMeters": 91823,
"placeExternalId": "erpId:STORE-442",
"placeId": "123456",
"poNumber": "123456",
"priority": "HIGH",
"serviceTaskInstances": [
{
"id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"laborHourlyCost": {
"amount": "94.01",
"currency": "usd"
},
"laborTimeMinutes": 60,
"notes": "Replaced gasket; will revisit next service.",
"parts": [
{
"costCentsOverride": 1000,
"id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"partId": "P0077",
"quantity": 2.5
}
],
"partsCost": {
"amount": "94.01",
"currency": "usd"
},
"serviceTaskId": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"status": "Unknown"
}
],
"startedAtTime": "2019-06-13T19:08:25Z",
"status": "OPEN",
"tax": {
"basisPoints": 700,
"money": {
"amount": "94.01",
"currency": "usd"
}
},
"vendorUuid": "5523a39f-42ef-4820-83d0-dfe73dbe7853"
}Response
OK response.
Example response
{
"data": {
"archivedAtTime": "2019-06-13T19:08:25Z",
"assetId": "12443",
"assignedUserId": "1234",
"assignees": [
{
"userId": "67890"
}
],
"attachments": [
{
"id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"processingStatus": "processing",
"url": "https://samsara-forms-submission-media-uploads.s3.us-west-2.amazonaws.com/123456",
"urlExpiresAt": "2019-06-13T19:08:25Z"
}
],
"attributes": [
{
"dateValues": [
"2024-01-15",
"2024-12-31"
],
"id": "494123",
"name": "Compliance/ELD",
"numberValues": [
867,
5309
],
"stringValues": [
"HQ",
"Leased"
]
}
],
"category": "PREVENTIVE",
"closingNotes": "Everything was fixed without issues.",
"completedAtTime": "2019-06-13T19:08:25Z",
"createdAtTime": "2019-06-13T19:08:25Z",
"createdByUserId": "1234",
"description": "The vehicle is not starting.",
"discount": {
"basisPoints": 500,
"money": {
"amount": "94.01",
"currency": "usd"
}
},
"dueAtTime": "2019-06-13T19:08:25Z",
"engineHours": 91823,
"id": "5",
"invoiceNumber": "123456",
"items": [
{
"id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"type": "ISSUE"
}
],
"maintenanceSite": {
"name": "LAX Service Bay 3",
"placeExternalIds": {
"Blanditiis laborum.": "Quis nesciunt excepturi voluptatem.",
"Occaecati repellendus.": "Adipisci velit nihil.",
"Placeat id.": "Totam ipsum quaerat."
},
"placeId": "123456"
},
"odometerMeters": 91823,
"poNumber": "123456",
"priority": "HIGH",
"serviceTaskInstances": [
{
"assignees": [
{
"userId": "67890"
}
],
"id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"laborHourlyCost": {
"amount": "94.01",
"currency": "usd"
},
"laborTimeMinutes": 60,
"notes": "Replaced gasket; will revisit next service.",
"parts": [
{
"costCentsOverride": 1000,
"id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"partId": "P0077",
"quantity": 2.5
}
],
"partsCost": {
"amount": "94.01",
"currency": "usd"
},
"serviceTaskId": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
"status": "Unknown",
"subtasks": [
{
"form": {
"formSubmissionUuid": "5523a39f-42ef-4820-83d0-dfe73dbe7853"
},
"procedure": {
"name": "Inspect brakes"
}
}
]
}
],
"startedAtTime": "2019-06-13T19:08:25Z",
"status": "OPEN",
"tax": {
"basisPoints": 700,
"money": {
"amount": "94.01",
"currency": "usd"
}
},
"unallocatedLabor": {
"cost": {
"amount": "94.01",
"currency": "usd"
},
"timeMinutes": 60
},
"updatedAtTime": "2019-06-13T19:08:25Z",
"vendorUuid": "5523a39f-42ef-4820-83d0-dfe73dbe7853",
"workOrderTemplateIds": [
"5523a39f-42ef-4820-83d0-dfe73dbe7853",
"5523a39f-42ef-4820-83d0-dfe73dbe7853",
"5523a39f-42ef-4820-83d0-dfe73dbe7853"
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.