Update a Build
PUThttps://api-dev.ianai.co/v2/build/:id
Update a Build
Request
Responses
- 200
- 400
- 401
- 403
- 500
Build information
Bad request error
Unauthorized error
Token issue like Expired or corrupted
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.Put, "https://api-dev.ianai.co/v2/build/:id");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n \"active\": true,\n \"txn_datetime\": \"2020-01-01T00:00:00Z\",\n \"doc_number\": \"BUILD_123456\",\n \"internal_notes\": \"Build order for item 123456\",\n \"status\": \"PENDING\",\n \"location\": {\n \"id\": \"uuid\",\n \"name\": \"Location 1\"\n },\n \"project_code\": {\n \"id\": \"uuid\",\n \"name\": \"Project 1\"\n },\n \"department\": {\n \"id\": \"uuid\",\n \"name\": \"Department 1\"\n },\n \"custom_fields\": {},\n \"linked_transaction\": [\n {\n \"entity_name\": \"PurchaseOrderLineItem\",\n \"entity_key\": \"uuid\"\n }\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 \"line_items\": [\n {\n \"line_number\": 1,\n \"item\": {\n \"id\": \"uuid\",\n \"name\": \"Component Item 1\"\n },\n \"description\": \"Component Item 1 description\",\n \"quantity\": 10,\n \"qty_on_hand\": 50,\n \"used_per_unit\": 3,\n \"uom_conversion\": 1,\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 \"overhead_items\": [\n {\n \"line_number\": 1,\n \"item\": {\n \"id\": \"uuid\",\n \"name\": \"Component Item 1\"\n },\n \"account\": {\n \"id\": \"uuid\",\n \"name\": \"Overhead Account 1\"\n },\n \"description\": \"Component Item 1 description\",\n \"quantity\": 10,\n \"unit_cost\": 10,\n \"amount\": 100,\n \"linked_transaction\": [\n {\n \"entity_name\": \"PurchaseOrderLineItem\",\n \"entity_key\": \"uuid\"\n }\n ]\n }\n ],\n \"attachment\": [\n \"attachment uuid\"\n ],\n \"bom\": {\n \"id\": \"uuid\",\n \"name\": \"string\"\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear