Create Work Order
POSThttps://racko-api.ianai.co/v2/workorder
Create Work Order
Request
Responses
- 200
- 400
- 401
- 403
- 409
- 500
Work Order
Bad request error
Unauthorized error
Token issue like Expired or corrupted
Conflict
Internal Server error
Authorization: http
name: bearerAuthtype: httpscheme: bearerbearerFormat: JWT
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://racko-api.ianai.co/v2/workorder");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n \"active\": true,\n \"doc_number\": \"example work order\",\n \"status\": \"PENDING\",\n \"txn_datetime\": \"2024-01-01T00:00:00Z\",\n \"start_datetime\": \"2024-01-01T00:00:00Z\",\n \"end_datetime\": \"2024-01-01T00:00:00Z\",\n \"due_date\": \"2024-01-01\",\n \"progress_percentage\": 50,\n \"total_operations\": 10,\n \"completed_operations\": 5,\n \"internal_notes\": \"string\",\n \"custom_fields\": {},\n \"linked_transaction\": [\n {\n \"entity_name\": \"PurchaseOrderLineItem\",\n \"entity_key\": \"uuid\"\n }\n ],\n \"item_options\": {},\n \"department\": {\n \"id\": \"\",\n \"name\": \"example department\"\n },\n \"location\": {\n \"id\": \"\",\n \"name\": \"example location\"\n },\n \"project_code\": {\n \"id\": \"\",\n \"name\": \"example project code\"\n },\n \"built_items\": [\n {\n \"line_number\": 1,\n \"item\": {\n \"id\": \"uuid\",\n \"name\": \"Built Item 1\"\n },\n \"description\": \"Built Item 1 description\",\n \"quantity\": 10,\n \"qty_on_hand\": 50,\n \"measurements\": {\n \"id\": \"uuid\",\n \"weight\": 1,\n \"weight_unit\": \"lbs\",\n \"length\": 1,\n \"height\": 1,\n \"width\": 1,\n \"dimension_unit\": \"in\"\n },\n \"linked_transaction\": {\n \"entity_name\": \"PurchaseOrderLineItem\",\n \"entity_key\": \"uuid\"\n },\n \"uom\": {\n \"id\": \"uuid\",\n \"name\": \"Unit\"\n },\n \"binlocation\": {\n \"id\": \"uuid\",\n \"name\": \"Bin 2\"\n },\n \"lot\": {\n \"id\": \"uuid\",\n \"name\": \"LOT123456\"\n },\n \"serials\": \"SERIAL100\",\n \"class_ref\": {\n \"id\": \"uuid\",\n \"name\": \"Class 1\"\n },\n \"expiry_date\": \"2024-07-29\",\n \"item_options\": {},\n \"option_template\": {\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"name\": \"Option template name\"\n }\n }\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear