Partner - OgnianApostolov/builderly-api-docs GitHub Wiki
Model
Partners partner {
"_id": {
"autogenerated": "true"
},
"name": {
"type": "string",
"required": "true"
},
"venue": {
"type": "string",
"required": "true"
},
"city": {
"type": "string",
"required": "true"
},
"address": {
"type": "string",
"required": "true"
},
"contact": {
"type": "string",
"required": "true"
},
"additional_information": {
"type": "string"
},
"medias": [{
"media": {
"type": "Media_.ObjectId"
}
}]
}
Methods
Create new
POST /partners
req.body required
method: 'POST'
{
url: 'https://{{your-builderly-domain}}/partners,
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 201
{}
Error - status 400
{
error_message
}
Retrieve multiple
GET /partners?ionic=true
method: 'GET'
{
url: 'https://{{your-builderly-domain}}/partners?ionic=true',
headers: {},
json: true,
body: {}
}
Responses
Success - status 200
[partners]
Error - status 500
{
error_message
}
- Example usages:
/partners?ionic=true
- Get all partners
Retrieve single
GET /partners/:id?
method: 'GET'
{
url: 'https://{{your-builderly-domain}}/partners/{{partner._id}}',
headers: {},
json: true,
body: {}
}
Responses
Success - status 200
{ partner }
Not found - status 404
{}
Error - status 500
{
error_message
}
- Example usages:
/partners/:id
- Retrives a specific partner
Update single
PATCH /partners/:id
method: 'PATCH'
{
url: 'https://{{your-builderly-domain}}/partners/{{partner._id}}',
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 200
{ partner }
Error - status 400
{
error_message
}
Not found - status 404
{}
Delete single
DELETE /partners/:id
method: 'DELETE'
{
url: 'https://{{your-builderly-domain}}/partners/{{partners._id}}',
headers: {
'Authorization': 'Bearer ' + token
},
json: true,
body: {}
}
Responses
Success - status 200
{ partner }
Not found - status 404
{}
Error - status 500
{
error_message
}