API Documentation

API Endpoint

Lost Reasons

Lost Reasons

GET /api/v2/lost_reasons
Requestsreturns lost reasons

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
Responses200
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 reasons
GET/api/v2/lost_reasons


GET /api/v2/lost_reasons/1
Requestsreturns lost reasons

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
Responses200
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 reason
GET/api/v2/lost_reasons/{id}

URI Parameters
HideShow
id
number (required) Example: 1

lost reason id


POST /api/v2/lost_reasons
Requestscreates lost reasonreturns error

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"
    }
  }
}
Responses201
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": ""
    }
  }
}
Responses422
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"
      }
    }
  ]
}

Create a lost reason
POST/api/v2/lost_reasons

URI Parameters
HideShow
name
nstring (required) Example: Name

name


PATCH /api/v2/lost_reasons/1
Requestsupdates lost reasonreturns error

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"
    }
  }
}
Responses200
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": ""
    }
  }
}
Responses422
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 reason
PATCH/api/v2/lost_reasons/{id}

URI Parameters
HideShow
id
number (required) Example: 1

lost reason id


PATCH /api/v2/lost_reasons/1/archive
Requestsarchives lost reason

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
Responses200
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 reason
PATCH/api/v2/lost_reasons/{id}/archive

URI Parameters
HideShow
id
number (required) Example: 1

lost reason id


Generated by aglio on 02 Aug 2025