Find a record by your key or ours
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.slflo.com/api/integration/v1/lookup"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.slflo.com/api/integration/v1/lookup")) .header("Authorization", "Bearer <token>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());const url = 'https://api.slflo.com/api/integration/v1/lookup';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.slflo.com/api/integration/v1/lookup \ --header 'Authorization: Bearer <token>'Entity is customer, branch (your key is CUSTOMER_REF/BRANCH_REF), product, unit, price_list, warehouse, order, invoice, payment (or receipt), return (or credit_note) or van (external_ref is the van’s SLFLO location code; the answer adds van.rep and van.held_back_code); send external_ref or id. A product answer adds product.tracking: NONE, BATCH (send lot on its load and unload lines) or SERIAL. A unit, product or price list your ERP has no key for yet is also found by our code (external_ref null): the row your PUT with that ref would adopt. A miss is exists: false. Needs a scope of the entity’s family.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Find a record by your key or ours
object
object
object
object
object
object
Example
{ "data": { "entity": "customer", "exists": true, "external_number": null, "external_ref": "CUST-0042", "id": "C0000001", "number": "CUST-1", "product": null, "van": null, "version": 9123 }}default
Section titled “default”An error: the code says what, retryable whether to try again.
object
object
Stable code, e.g. SCOPE_MISSING, UNKNOWN_REFERENCE.
Field-level problems: {field, code}.
object
What happened and how to fix it.
Quote it to support; it finds the server log.
Whether the same call may succeed later.
Example
{ "error": { "code": "SCOPE_MISSING", "details": [], "message": "This client does not hold the invoices:read scope.", "request_id": "req_01J9X4Q7T2M8P3NRT6V5WZ", "retryable": false }}
