Partner
This article guides you through how to manage your customer data.
Read
/api/res.partner
Read all your customers.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/res.partner -X GET -H
"access_token: XXXXXXXXXXXXXXXXX"
{
"code":200,
"data":{
"count":2,
"results":[
{
"website":"https://www.example.org/",
"city":"Graz",
"fax":null,
"name":"Max Mustermann",
"zip":"8010",
"street2":null,
"country_id":{
"code":"AT",
"id":1,
"name":"Austria"
},
"comment":null,
"email":"max.mustermann@example.org",
"phone":"+43664 123456789",
"street":"Musterstraße 12",
"state_id":{
"id":5,
"name":"Styria"
},
"category_id": {
"id":null,
"name":null,
},
"type":"contact",
"id":973,
"vat":null,
"bank_ids":[]
},
{ ... },
}
}
/api/res.partner/<id>
Read a single customer with the provided ID.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/res.partner/973 -X GET -H
"access_token: XXXXXXXXXXXXXXXXX"
{
"code":200,
"data":{
"website":"https://www.example.org/",
"city":"Graz",
"fax":null,
"name":"Max Mustermann",
"zip":"8010",
"street2":null,
"country_id":{
"code":"AT",
"id":1,
"name":"Austria"
},
"comment":null,
"email":"max.mustermann@example.org",
"phone":"+43664 123456789",
"street":"Musterstraße 12",
"state_id":{
"id":5,
"name":"Styria"
},
"category_id": {
"id":null,
"name":null,
},
"type":"contact",
"id":973,
"vat":null,
"bank_ids":[]
},
"success":true
}
Create
/api/res.partner
Create a single customer.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/res.partner -X POST -H
"access_token: XXXXXXXXXXXXXXXXX" -d '{"name": "Martina Musterfrau"}'
{
"code":200,
"data":{
"website":null,
"city":null,
"fax":null,
"name":"Martina Musterfrau",
"zip":null,
"street2":null,
"country_id":{
"code":null,
"id":null,
"name":null
},
"comment":null,
"email":null,
"phone":null,
"street":null,
"state_id":{
"id":null,
"name":null
},
"category_id":{
"id":null,
"name":null
},
"type":"contact",
"id":974,
"vat":null,
"bank_ids":[
]
},
"success":true
}
Update
/api/res.partner<id>
Update a single customer.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/res.partner/25 -X PUT -H
"access_token: XXXXXXXXXXXXXXXXX" -d '{"email": "martina.musterfrau@example.org"}'
{
"code":200,
"data":{
"website":null,
"city":null,
"fax":null,
"name":"Martina Musterfrau",
"zip":null,
"street2":null,
"country_id":{
"code":null,
"id":null,
"name":null
},
"comment":null,
"email":"martina.musterfrau@example.org",
"phone":null,
"street":null,
"state_id":{
"id":null,
"name":null
},
"category_id":{
"id":null,
"name":null
},
"type":"contact",
"id":974,
"vat":null,
"bank_ids":[
]
},
"success":true
}
Delete
/api/res.partner<id>
Delete a single customer.
curl -v -i -k -H "Content-Type: text/html" https://test.weship.at/api/res.partner/974 -X DELETE -H
"access_token: XXXXXXXXXXXXXXXXX"
{"code": 200, "data": {"id": 974}, "success": true}
Properties
res.partner
Properties related to the res.partner table.
| Field | Data type | Description | |
|---|---|---|---|
| bank_ids |
List of bank connections res.partner.bank |
||
| category_id |
Specific category assigned to the customer res.partner.category |
||
| city | Name of the city | ||
| comment | Additional information | ||
| country_id |
Country in which the customer lives res.partner.country |
||
| Email address | |||
| fax | Fax number | ||
| id | Unique identifier of the customer | ||
| name | First and last name | ||
| phone | Phone or mobile number | ||
| state_id |
State of the country res.partner.country.state |
||
| street | Name of the street, including house number | ||
| street2 | Additional address information | ||
| type | Type of customer | ||
| vat | VAT/TIN number | ||
| website | URL of the website | ||
| zip | ZIP code of the city |
res.partner.country
Properties related to the res.partner.country table.
| Field | Data type | Description | |
|---|---|---|---|
| code | Official ISO 3166 alpha-2 shortcode | ||
| id | Unique identifier of the country | ||
| name | Name |
res.partner.country.state
Properties related to the res.partner.country.state table.
| Field | Data type | Description | |
|---|---|---|---|
| id | Unique identifier of the state | ||
| name | Name |
res.partner.bank
Properties related to the res.partner.bank table.
| Field | Data type | Description | |
|---|---|---|---|
| acc_number | IBAN of the bank account | ||
| bank_bic | BIC of the bank | ||
| id | Unique identifier of the bank |
res.partner.category
Properties related to the res.partner.category table.
| Field | Data type | Description | |
|---|---|---|---|
| id | Unique identifier of the category | ||
| name | Name |