API Documentation
Lost Reasons ¶
Lost Reasons ¶
GET /api/v2/lost_reasons
Requests
GET /api/v2/lost_reasons
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "2",
"type": "lost_reasons",
"attributes": {
"name": "test lost reason",
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "710"
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/lost_reasons?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/lost_reasons?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}
Get lost reasonsGET/api/v2/lost_reasons
GET /api/v2/lost_reasons/1
Requests
GET /api/v2/lost_reasons/3
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "3",
"type": "lost_reasons",
"attributes": {
"name": "test lost reason",
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "711"
}
}
}
},
"meta": {}
}
Gets a lost reasonGET/api/v2/lost_reasons/{id}
URI Parameters
- id
number
(required) Example: 1lost reason id
POST /api/v2/lost_reasons
Requests
POST /api/v2/lost_reasons
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "lost_reasons",
"attributes": {
"name": "test name"
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "5",
"type": "lost_reasons",
"attributes": {
"name": "test name",
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "712"
}
}
}
},
"meta": {}
}
POST /api/v2/lost_reasons
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "lost_reasons",
"attributes": {
"name": ""
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
PATCH /api/v2/lost_reasons/1
Requests
PATCH /api/v2/lost_reasons/7
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "lost_reasons",
"attributes": {
"name": "new name"
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "7",
"type": "lost_reasons",
"attributes": {
"name": "new name",
"archived_at": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "714"
}
}
}
},
"meta": {}
}
PATCH /api/v2/lost_reasons/8
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "lost_reasons",
"attributes": {
"name": ""
}
}
}
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/name"
}
}
]
}
Update a lost reasonPATCH/api/v2/lost_reasons/{id}
URI Parameters
- id
number
(required) Example: 1lost reason id
PATCH /api/v2/lost_reasons/1/archive
Requests
PATCH /api/v2/lost_reasons/9/archive
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "9",
"type": "lost_reasons",
"attributes": {
"name": "test lost reason",
"archived_at": "2025-08-02T02:08:14.000+02:00"
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "716"
}
}
}
},
"meta": {}
}
Archives a lost reasonPATCH/api/v2/lost_reasons/{id}/archive
URI Parameters
- id
number
(required) Example: 1lost reason id
Generated by aglio on 02 Aug 2025