Companies

Company Listing

Companies let users share access to private discussions. It's a handy way of letting multiple customers from the same group see each other's posts.

> curl -H "Accept: application/vnd.tender-v1+json" "https://USER:PASS@api.tenderapp.com/yoursite/companies"
{
  "offset": 0,
  "total": 3,
  "per_page": 30,
  "companies": [
    {COMPANY}, {COMPANY}, etc
  ]
}

Single Company

> curl -H "Accept: application/vnd.tender-v1+json" "https://USER:PASS@api.tenderapp.com/yoursite/companies/2"
{
  "name": "Smithson LLC",
  "permalink": "smithsonllc",
  "created_at": "2008-11-12T22:28:58Z",
  "updated_at": "2009-07-04T05:26:44Z",
  "href": "https://api.tenderapp.com/yoursite/companies/12345"
}

Attributes

  • id - The ID of the company (duh!) You'll use this when setting a user's company.
  • name - The name of the company.
  • permalink - This is the sanitized name used in company URLs. It is auto-generated from the name if not provided.
  • href - API URL for the company.

You can use the User API to set the company_id on the user to assign them to a company.

Create Company

To create a company, you need to POST a JSON company with the name field. permalink is optional. If successful, a valid company JSON record is returned.

> curl -H "Accept: application/vnd.tender-v1+json" \
  -H "Content-Type: application/json" \
  -d '{"name":"Great New Company"}'
  "https://USER:PASS@api.tenderapp.com/yoursite/companies"