Relocate spare part(s)
POSThttps://api.mobility-work.com/partners/v1/spare-parts/relocate/bulk
Starter | Premium | Ultimate |
---|---|---|
❌ | ✔️ | ✔️ |
Relocate spare parts from a location to another one
⚠️ The request is processed in background. It can takes up to several minutes to see the change if there is a lot of changes.
⚠️ It is not possible to define a quantity to transfer. All stock from the source location is moved to the target location ⚠️ It is only possible to relocate spare parts to existing locations in the network. If the locations do not exist, please use the dedicated API to create these locations beforehand ⚠️ A maximum of 10.000 creations can be processed in a single request. You need to split in several requests if you have more.
Request
Responses
- 202
- 400
- 401
- 403
Request accepted (e.g. all changes will be processed as soon as possible)
Request contains invalid data or does not have all required data
Missing or invalid Api Key (e.g. revoked or non-existent)
Access denied
Authorization: Api-Key
name: Api-Keytype: apiKeyin: headerdescription: Every requests to the API **must be** authenticated. You must provide the API Key to authenticate as an HTTP header `Api-Key`. For instance: ```curl POST /partners/v1/tasks Api-Key: 913a8f7cef6ff084f1635511b9c7d07c3bab2816 [...] ``` Each API Key is associated to a single network providing an access to all features available on the network subscription plan. To get an API Key, send an email to [sales@mobility-work.com](mailto:sales@mobility-work.com) or contact your CSM.
- 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://api.mobility-work.com/partners/v1/spare-parts/relocate/bulk");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Api-Key", "<Api-Key>");
var content = new StringContent("[\n {\n \"sparePartId\": \"string\",\n \"source\": {\n \"locationName\": \"string\"\n },\n \"target\": {\n \"locationName\": \"string\"\n }\n }\n]", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());