/suppliers/{supplier}
This endpoint allows you to update a specific Supplier.
updateSupplier
| Name | Type | Description |
|---|---|---|
supplier
required
|
string |
the Supplier id |
Content-Type: application/json
name
string
The name of the Supplier.
Example: John Doe
code
string
The code for the Supplier. Must be unique in the Entity.
Example: BA02
vat
string | null
The NIF/VAT number of the Supplier.
Example: 123456789
address
string | null
The address of the Supplier.
Example: 5221 Brook Rd
post_code
string | null
The postal code of the Supplier.
Example: 4321-123
city
string | null
The city of the Supplier.
Example: Richmond
area
string | null
The district, region or state where the Supplier is from
Example: Madrid
latitude
number | null
The latitude of the Supplier's Address
Example: 13.4134995
longitude
number | null
The longitude of the Supplier's Address
Example: 26.826999
iban
string | null
The IBAN of the Supplier
Example: 1234 4321 5678 8765 9999 1
add_to_market
boolean | null
Indicates if this Supplier should be added to the Infraspeak Market, where other Infraspeak Network users will be able to find and request their services. This field will default to false when not sent in the request. If the Supplier was already added to the Infraspeak Market, it won't be added again.
Example: 1
contacts
array<integer> | null
A list of Contact IDs to associate with the Supplier. If sent in the request, this list will replace any list of contacts previously associated with the Supplier.
data
object
Supplier model structure details
id
string
required
read-only
ID of the Supplier
Example: 123
type
string
required
read-only
Model type
supplier
Example: supplier
attributes
object
required
supplier_id
integer
ID of the Supplier
Example: 123
name
string
Name of the Supplier
Example: John Doe
code
string | null
Code of the Supplier
Example: abc123
vat
string | null
NIF/ VAT Number of the Supplier
Example: 123456789
address
string | null
Address of the Supplier
Example: 5221 Brook Rd
postal_code
string | null
Postal Code of the Supplier
Example: 4321-123
city
string | null
City of the Supplier
Example: Richmond
area
string | null
The district, region or state where the Supplier is from
Example: Madrid
country
string | null
Country of the Supplier
Example: ES
iban
string | null
IBAN of the Supplier
Example: 1234 4321 5678 8765 9999 1
market_supplier_id
string (uuid) | null
The UUID of the Supplier ID in the Infraspeak Market
Example: dd1c6f55-295d-4010-993a-81e2c7240878
supplier_uuid
string (uuid)
UUID of the Supplier
Example: dd1c6f55-295d-4010-993a-81e2c7240878
date_created
string (date-time)
Creation date of Supplier
Example: 2022-12-12 12:12:30
has_handshake
boolean
Indicates if the Supplier is "connected" to work on Infraspeak Network
Example: 1
profile_steps_count
integer
The count of profile steps that the Supplier had done in the Infraspeak Network
Example: 3
relationships
object
The relationships of the Supplier (Only present when expanded in the request)
contacts
object
The Contacts associated with the Supplier
files
object
The Files associated with the Supplier
handshake
object
The Infraspeak Network Handshake associated with the Supplier
categories
object
The Infraspeak Market Categories associated with the Supplier
services
object
The Infraspeak Market Services associated with the Supplier
invite
object
The Infraspeak Network Invite associated with the Supplier
status
string
error
error
object
properties
object
Only present when related to property validation error
dev_message
string
Example: Property validation error. Check the "properties" section in the response.
http_code
integer
400
message
string
Example: Property validation error.
more_info
string
status
string
error
error
object
http_code
integer
401
message
string
Example: Authentication token invalid.
more_info
string
status
string
error
error
object
http_code
integer
429
message
string
Example: Too Many Requests.
more_info
string
status
string
error
error
object
http_code
integer
500
message
string
Example: An error has occurred during the request.
more_info
string
curl -X PATCH \
'https://api.sandbox.infraspeak.com/v3/suppliers/{supplier}' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"name": "John Doe",
"code": "BA02",
"vat": "123456789",
"address": "5221 Brook Rd",
"post_code": "4321-123",
"city": "Richmond",
"area": "Madrid",
"latitude": 13.4134995,
"longitude": 26.826999,
"iban": "1234 4321 5678 8765 9999 1",
"add_to_market": true,
"contacts": []
}'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/suppliers/{supplier}', {
method: 'PATCH',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
body: JSON.stringify({
"name": "John Doe",
"code": "BA02",
"vat": "123456789",
"address": "5221 Brook Rd",
"post_code": "4321-123",
"city": "Richmond",
"area": "Madrid",
"latitude": 13.4134995,
"longitude": 26.826999,
"iban": "1234 4321 5678 8765 9999 1",
"add_to_market": true,
"contacts": []
}),
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->patch('https://api.sandbox.infraspeak.com/v3/suppliers/{supplier}',
array (
'name' => 'John Doe',
'code' => 'BA02',
'vat' => '123456789',
'address' => '5221 Brook Rd',
'post_code' => '4321-123',
'city' => 'Richmond',
'area' => 'Madrid',
'latitude' => 13.4134995,
'longitude' => 26.826999,
'iban' => '1234 4321 5678 8765 9999 1',
'add_to_market' => true,
'contacts' =>
array (
),
)
);
import requests
response = requests.patch(
'https://api.sandbox.infraspeak.com/v3/suppliers/{supplier}',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
json={
{
"name": "John Doe",
"code": "BA02",
"vat": "123456789",
"address": "5221 Brook Rd",
"post_code": "4321-123",
"city": "Richmond",
"area": "Madrid",
"latitude": 13.4134995,
"longitude": 26.826999,
"iban": "1234 4321 5678 8765 9999 1",
"add_to_market": true,
"contacts": []
}
},
)
data = response.json()