Introduction

Welcome to the Cropster API reference!

The Cropster API is an implementation of the JSON-API v1 specification for describing beautiful RESTful interfaces. With it you can use an off-the-shelf JSON-API client with little modification to get going quickly. This API reference document lists and describes the individual resources you can use to manipulate objects on the Cropster Platform. Please note that the Cropster API is still in BETA. While we aim for a robust API specification and implementation, at any point we may have to change part of the API to better support our clients and/or to ease the use of this API.

Happy API-ing! — Cropster Devs

Disclaimer

As the creator of an integration with our API, it is your responsibility to ensure the following:

The data of our customer must be kept safe!

Customer data must never be leaked by your application, nor must the data be corrupted by erroneous behavior of your integration.

Our system health must not be put at risk!

Bad practices that should be avoided include:

  • Querying our API in an unthrottled and / or infinite loop

  • Inclusion of too many relationships in one request

  • Requesting many objects by ID in a loop, rather than fetching them in one request by passing multiple IDs or applying appropriate filters

Failure to respect these guidelines may lead to the withdrawal of the permission to use our API. The responsibility for damage done to customer data or our system lies with the creator(s) of the faulty application.

Conventions

The Cropster API is designed to minimize both the number of requests and the amount of data transmitted between clients and servers. This efficiency is achieved without compromising readability, flexibility, or discoverability. Keep the following in mind when developing against the API:

  • All requests must be sent over HTTPS. Plain HTTP requests will be ignored.

  • All API requests MUST include a valid User-Agent header. Requests with no User-Agent header will be rejected.

  • All properties are camelCased (example: sensorialSheets, not sensorial-sheets)

  • All entity types are pluralized (example: "type": "lots", not "type": "lot" )

  • The Cropster API requires the JSON API media type with UTF-8 charset (application/vnd.api+json;charset=UTF-8) for exchanging data.

  • In line with the JSON API specification, updating an object is done through a PATCH request to the server. A Payload should only contain the data that will be updated. PUT is not a supported operation.

  • Whenever parameters accept an array of values, you may simply name the same parameter multiple times.

  • In general, boolean attribute’s names are prefixed with is or has

Quick introduction to the JSON-API specification

If you are already familiar with JSON-API specification, you may skip this section.

The fundamental idea of the JSON-API spec is to unify the way JSON payloads are structured. Each object that is exchanged with the API will have:

  • an id, which could be a number or a String. In our API we use Strings.

  • a type, declared as a String

  • an attributes section

  • a relationships section

This concept is best illustrated via an example. A very simple JSON payload for a person object could look like this:

{
  "data": {
    "id": "01",
    "type": "persons",
    "attributes": {
      "name": "Clark Kent",
      "occupation": "Reporter"
    },
    "relationships": {
      "mother": {
        "data": {
          "id": "02",
          "type": "persons"
        }
      },
      "father": {
        "data": {
          "id": "03",
          "type": "persons"
        }
      }
    }
  }
}

Attributes are comprised of simple types like numbers, strings, booleans, or simple embedded objects (like a monetary value with an amount and a currency). Relationships refer to objects that have their own id and type as well as their own attributes and relationships.

When reading from the API, payloads will also include links. Links are relevant for the retrieval of related content. However, when writing to the API, links do not need to be included.

{
  "data": {
    "id": "01",
    "type": "persons",
    "attributes": {
      "name": "Clark Kent",
      "job": "reporter"
    },
    "relationships": {
      "father": {
        "data": {
          "id": "02",
          "type": "persons"
        },
        "links": {
            "self": "https://exampleserver.com/api/persons/01/relationships/father",
            "related": "https://exampleserver.com/api/persons/01/father"
        }
      },
      "mother": {
        "data": {
          "id": "03",
          "type": "persons"
        },
        "links": {
            "self": "https://exampleserver.com/api/persons/01/relationships/mother",
            "related": "https://exampleserver.com/api/persons/01/mother"
        }
      }
    },
    "links": {
      "self": "https://exampleserver.com/api/persons/01"
    }
  }
}

URL Schema

Like payloads, URLs also follow a schema. Operations on a certain type of object all share the same base URL. Using the person example from above, let’s examine which URLs exist for interaction with the API. Note: an object’s type determines its URL.

To create a new person:
POST https://exampleserver.com/api/persons

To retrieve one person:
GET https://exampleserver.com/api/persons/01

To retrieve multiple persons by ID:
GET https://exampleserver.com/api/persons/01,02,03

To retrieve multiple persons applying filters:
GET https://exampleserver.com/api/persons?filter[persons][name]=Clark

To update a person:
PATCH https://exampleserver.com/api/persons/01

To delete a person:
DELETE https://exampleserver.com/api/persons/01

POST and PATCH require a payload to be successfully passed to the server. For relationships, operations like GET, POST, PATCH, or DELETE can be implemented via the relationship URL, e.g. https://exampleserver.com/api/persons/01/father. Note: not all relationship URLs support all operations.

All further examples will relate to actual objects of our API, rather than the imaginary API for persons. Thanks for your help Clark Kent!

Query parameters

Many endpoints support multiple query parameters to refine their responses. The documentation of each endpoint will indicate which query parameters it supports. Possible query parameters are:

  • filter, e.g., GET /lots/?filter[lots][group]=ABCD to get only lots belonging to the ABCD group

  • include, e.g. GET /groups?include[groups]=users to include users when fetching groups

  • sort, e.g. GET /users?sort[users][username]=desc to sort all accounts by user name in descending order

  • page, e.g. GET /lots?page[number]=0&page[size]=10 to return only the first 10 lots. The default values for page number and page size are 0 and 50, respectively.

Relationships

There are two kinds of cardinality for relationships: toOne and toMany. Whenever the relationship name is in singular form there will only be one related object, i.e. it is a toOne relationship. If the name is in plural form a toMany relationship is implied. In case this convention is not followed, the cardinality of a relationship will be indicated in its description (the notes column of the relationships table).

Inclusion of relationships

Including a relationship, for example via include[groups]=users, will introduce an additional included section in the response payload. It will contain an array of all the included objects.

While it is technically possible to include any relationship in your requests, it always introduces some overhead. Especially the inclusion of toMany relationships leads to increased response times and server load.

Getting Started

Authentication

To start using the Cropster API you must first get API access enabled on your account. To do this, simply contact your account manager. Then you must generate your API credentials. Please see our developers getting started page to learn more.

User agent

All API requests MUST include a valid User-Agent header. Requests with no User-Agent header will be rejected. Please use your company name or the name of your application for the User-Agent header value. This allows us to contact you if there are problems. Here’s an example:

User-Agent: ClarkKentRoasters-Cropster-App

Basic HTTP Authentication

Got your API credentials handy? Good. The Cropster API uses Basic Authentication to authenticate users. All your requests must be authenticated and use the HTTPS protocol. Set your request’s Authorization header value to "Basic " (note the space), plus the Base64 encoded output of your credentials concatenated as <api-key>:<api-secret>.

Example: Authorization: Basic QWxhZGRpbjpPcGVuU2VzYW1l

JSON-API client libraries

There are quite a few client libraries for many programming languages available, which ease the construction of API requests and support serialization of and deserialization into your integration’s objects. Using such a library rids you from operating on rather complex and interlinked JSON data structures directly. Find them here:

API endpoints and objects

In the following section we describe all endpoints in terms of:

  • which objects they manipulate

  • how those objects are structured

  • which requests and query parameters are supported

By clicking on a request, you can expand it to see an example cUrl request and an example response body. Endpoints are organized by their parent topic.

Accounts

Group Memberships

Type name: groupMemberships

A user can have multiple group memberships in different groups.

Attributes

Name Type Constraints Notes

createdDate

dateTime

read only

-

Relationships

Name Constraints Notes

group

read only

-

user

read only

-

DELETE Delete a specific groupMembership

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/groupMemberships/<ID>'

Response body

N/A
GET Get a specific groupMembership

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/groupMemberships/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "groupMemberships",
    "attributes" : {
      "createdDate" : 1575281700412
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groupMemberships/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/groupMemberships/id/group"
        }
      },
      "user" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groupMemberships/id/relationships/user",
          "related" : "https://c-sar.cropster.com/api/v2/groupMemberships/id/user"
        }
      }
    }
  }
}
GET List all groupMemberships

Filter Parameters

Name Type Constraints Notes

filter[groupMemberships][group]

string

-

At least one of the filters 'group' and 'userName' must be set

filter[groupMemberships][userName]

string

-

At least one of the filters 'group' and 'userName' must be set. If only the username is set, then inactive groups are excluded.

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/groupMemberships?filter[groupMemberships][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "groupMemberships",
    "attributes" : {
      "createdDate" : 1575281700412
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groupMemberships/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/groupMemberships/id/group"
        }
      },
      "user" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groupMemberships/id/relationships/user",
          "related" : "https://c-sar.cropster.com/api/v2/groupMemberships/id/user"
        }
      }
    }
  } ]
}

Groups

Type name: groups

A group is a collection of users represented via group memberships. A user can belong to one or more groups.

Attributes

Name Type Constraints Notes

name

string

required

The name of the group, often the company name. Cannot contain the characters '/' or '$', e.g. CROPSTER.

createdDate

dateTime

read only

-

isActive

boolean

read only

False if this group’s status is LOST.

lastModifiedDate

dateTime

read only

-

lastStatusChangeDate

dateTime

read only

The date when this group’s status was last changed.

locale

locale

-

The locale associated with the group, default is 'en'.

reports

string[]

read only

-

timezone

dateTimeZone

-

-

Relationships

Name Constraints Notes

contact

read only

-

groupMemberships

-

-

physicalSheets

-

-

productType

-

-

projects

-

-

sensorialSheets

-

-

GET Get multiple specific groups

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/groups/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "groups",
    "attributes" : {
      "name" : "CROPSTER",
      "createdDate" : 1575281700412,
      "isActive" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "locale" : null,
      "reports" : [ "reports" ],
      "timezone" : null
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/contact"
        }
      },
      "groupMemberships" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/groupMemberships",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/groupMemberships"
        }
      },
      "physicalSheets" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/physicalSheets",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/physicalSheets"
        }
      },
      "productType" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/productType"
        }
      },
      "projects" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/projects",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/projects"
        }
      },
      "sensorialSheets" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/sensorialSheets",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/sensorialSheets"
        }
      }
    }
  } ]
}
GET Get a specific group

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/groups/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "groups",
    "attributes" : {
      "name" : "CROPSTER",
      "createdDate" : 1575281700412,
      "isActive" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "locale" : null,
      "reports" : [ "reports" ],
      "timezone" : null
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/contact"
        }
      },
      "groupMemberships" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/groupMemberships",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/groupMemberships"
        }
      },
      "physicalSheets" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/physicalSheets",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/physicalSheets"
        }
      },
      "productType" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/productType"
        }
      },
      "projects" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/projects",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/projects"
        }
      },
      "sensorialSheets" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/sensorialSheets",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/sensorialSheets"
        }
      }
    }
  }
}
GET List all groups

At least one of the filter parameters is required.

Filter Parameters

Name Type Constraints Notes

filter[groups][userName]

string

-

-

filter[groups][name]

string

-

-

filter[groups][code]

string

-

Groups with null codes are excluded by default.

filter[groups][accountManager.name]

string

-

-

filter[groups][groupStatus]

groupStatus

-

-

filter[groups][subscriptionPlan]

string

-

-

filter[groups][subscriptions.status]

accountStatus

-

Only applied when subscription plan filter is set.

filter[groups][salesAgent]

string

-

-

filter[groups][includeInactive]

boolean

-

Default is false.

filter[groups][lastModifiedDate.from]

dateTime

-

-

Sort Parameters

Name Value

sort[groups][name]

asc/desc

sort[groups][code]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/groups?filter[groups][userName]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "groups",
    "attributes" : {
      "name" : "CROPSTER",
      "createdDate" : 1575281700412,
      "isActive" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "locale" : null,
      "reports" : [ "reports" ],
      "timezone" : null
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/contact"
        }
      },
      "groupMemberships" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/groupMemberships",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/groupMemberships"
        }
      },
      "physicalSheets" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/physicalSheets",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/physicalSheets"
        }
      },
      "productType" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/productType"
        }
      },
      "projects" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/projects",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/projects"
        }
      },
      "sensorialSheets" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/sensorialSheets",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/sensorialSheets"
        }
      }
    }
  } ]
}
PATCH Update an existing group

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"groups","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/groups/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "groups",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "createdDate" : 1575281700412,
      "isActive" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "locale" : null,
      "reports" : [ "reports" ],
      "timezone" : null
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/contact"
        }
      },
      "groupMemberships" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/groupMemberships",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/groupMemberships"
        }
      },
      "physicalSheets" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/physicalSheets",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/physicalSheets"
        }
      },
      "productType" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/productType"
        }
      },
      "projects" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/projects",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/projects"
        }
      },
      "sensorialSheets" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/groups/id/relationships/sensorialSheets",
          "related" : "https://c-sar.cropster.com/api/v2/groups/id/sensorialSheets"
        }
      }
    }
  }
}

Users

Type name: users

Attributes

Name Type Constraints Notes

name

string

-

This is the full name of the user, e.g. Susy Smith.

active

boolean

-

Delete a user by setting this property to false.

createdDate

dateTime

read only

-

email

string

read only

-

lastModifiedDate

dateTime

read only

-

locale

locale

-

-

role

roleEnum

read only

-

timezone

dateTimeZone

-

-

username

string

-

This is usually the email of the user.

Relationships

Name Constraints Notes

groupMemberships

read only

-


GET Get multiple specific users

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/users/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "users",
    "attributes" : {
      "name" : "Susy Smith",
      "active" : null,
      "createdDate" : 1575281700412,
      "email" : "email",
      "lastModifiedDate" : 1575281700412,
      "locale" : null,
      "role" : "ADMINISTRATOR",
      "timezone" : null,
      "username" : null
    },
    "relationships" : {
      "groupMemberships" : {
        "data" : [ {
          "type" : "groupMemberships",
          "id" : "AAAA"
        }, {
          "type" : "groupMemberships",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/users/id/relationships/groupMemberships",
          "related" : "https://c-sar.cropster.com/api/v2/users/id/groupMemberships"
        }
      }
    }
  } ]
}
GET Get a specific user

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/users/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "users",
    "attributes" : {
      "name" : "Susy Smith",
      "active" : null,
      "createdDate" : 1575281700412,
      "email" : "email",
      "lastModifiedDate" : 1575281700412,
      "locale" : null,
      "role" : "ADMINISTRATOR",
      "timezone" : null,
      "username" : null
    },
    "relationships" : {
      "groupMemberships" : {
        "data" : [ {
          "type" : "groupMemberships",
          "id" : "AAAA"
        }, {
          "type" : "groupMemberships",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/users/id/relationships/groupMemberships",
          "related" : "https://c-sar.cropster.com/api/v2/users/id/groupMemberships"
        }
      }
    }
  }
}
GET List all users

Filter Parameters

Name Type Constraints Notes

filter[users][userName]

string

-

-

filter[users][group]

string

-

-

filter[users][name]

string

-

-

filter[users][isEvaluator]

boolean

-

-

filter[users][groupMemberships.permissions.name]

permissionEnum

-

Repeatable,

filter[users][isAccountManager]

boolean

-

- objects must match at least one.

filter[users][lastModifiedDate.from]

dateTime

-

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/users?filter[users][userName]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "users",
    "attributes" : {
      "name" : "Susy Smith",
      "active" : null,
      "createdDate" : 1575281700412,
      "email" : "email",
      "lastModifiedDate" : 1575281700412,
      "locale" : null,
      "role" : "ADMINISTRATOR",
      "timezone" : null,
      "username" : null
    },
    "relationships" : {
      "groupMemberships" : {
        "data" : [ {
          "type" : "groupMemberships",
          "id" : "AAAA"
        }, {
          "type" : "groupMemberships",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/users/id/relationships/groupMemberships",
          "related" : "https://c-sar.cropster.com/api/v2/users/id/groupMemberships"
        }
      }
    }
  } ]
}
PATCH Update an existing user

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"users","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/users/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "users",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "active" : null,
      "createdDate" : 1575281700412,
      "email" : "email",
      "lastModifiedDate" : 1575281700412,
      "locale" : null,
      "role" : "ADMINISTRATOR",
      "timezone" : null,
      "username" : null
    },
    "relationships" : {
      "groupMemberships" : {
        "data" : [ {
          "type" : "groupMemberships",
          "id" : "AAAA"
        }, {
          "type" : "groupMemberships",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/users/id/relationships/groupMemberships",
          "related" : "https://c-sar.cropster.com/api/v2/users/id/groupMemberships"
        }
      }
    }
  }
}

General

Contact Roles

Type name: contactRoles

Attributes

Name Type Constraints Notes

name

string

-

-

Relationships

This object has no relationships.

GET Get multiple specific contactRoles

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/contactRoles/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "contactRoles",
    "attributes" : {
      "name" : null
    },
    "relationships" : { }
  } ]
}
GET Get a specific contactRole

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/contactRoles/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "contactRoles",
    "attributes" : {
      "name" : null
    },
    "relationships" : { }
  }
}
GET List all contactRoles

Filter Parameters

Name Type Constraints Notes

filter[contactRoles][group]

string

required

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/contactRoles?filter[contactRoles][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "contactRoles",
    "attributes" : {
      "name" : null
    },
    "relationships" : { }
  } ]
}

Contacts

Type name: contacts

A contact holds contact data (e.g. the postal address plus website, email, …​) of a company or a person. Each Cropster user will have an associated contact object.

Attributes

Name Type Constraints Notes

idTag

string

-

A user defined ID, could be the contact’s ID in an external system.

name

string

read only

This is generated as a combination or the first and the last name of a contact, e.g. Susy Smith.

area

measure

-

-

association

string

-

-

city

string

-

-

companyName

string

-

-

country

country

-

-

createdDate

dateTime

read only

-

elevation

integer

-

-

email

string

-

-

fax

string

-

-

firstName

string

-

E.g. Susy.

gpsLocation

point

-

-

isArchived

boolean

-

-

lastModifiedDate

dateTime

read only

-

lastName

string

-

E.g. Smith.

mobile

string

-

-

notes

string

-

-

phone

string

-

-

region

string

-

-

state

string

-

-

street

string

-

-

subRegion

string

-

-

website

string

-

-

zip

string

-

-

Relationships

Name Constraints Notes

contactRoles

-

Contacts of type 'country' and 'field' cannot have more than this one role.

group

required

-

GET Get multiple specific contacts

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/contacts/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "contacts",
    "attributes" : {
      "idTag" : null,
      "name" : "Susy Smith",
      "area" : null,
      "association" : null,
      "city" : null,
      "companyName" : null,
      "country" : null,
      "createdDate" : 1575281700412,
      "elevation" : null,
      "email" : null,
      "fax" : null,
      "firstName" : "Susy",
      "gpsLocation" : null,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "lastName" : "Smith",
      "mobile" : null,
      "notes" : null,
      "phone" : null,
      "region" : null,
      "state" : null,
      "street" : null,
      "subRegion" : null,
      "website" : null,
      "zip" : null
    },
    "relationships" : {
      "contactRoles" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/contactRoles",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/contactRoles"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/group"
        }
      }
    }
  } ]
}
GET Get a specific contact

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/contacts/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "contacts",
    "attributes" : {
      "idTag" : null,
      "name" : "Susy Smith",
      "area" : null,
      "association" : null,
      "city" : null,
      "companyName" : null,
      "country" : null,
      "createdDate" : 1575281700412,
      "elevation" : null,
      "email" : null,
      "fax" : null,
      "firstName" : "Susy",
      "gpsLocation" : null,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "lastName" : "Smith",
      "mobile" : null,
      "notes" : null,
      "phone" : null,
      "region" : null,
      "state" : null,
      "street" : null,
      "subRegion" : null,
      "website" : null,
      "zip" : null
    },
    "relationships" : {
      "contactRoles" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/contactRoles",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/contactRoles"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/group"
        }
      }
    }
  }
}
GET List all contacts

Filter Parameters

Name Type Constraints Notes

filter[contacts][group]

string

required

filter[contacts][name]

string

-

filter[contacts][email]

string

-

filter[contacts][lastModifiedDate.from]

dateTime

-

filter[contacts][lastModifiedDate.to]

dateTime

-

filter[contacts][hasEmail]

boolean

-

filter[contacts][contactRoles]

string

-

filter[contacts][country]

country

-

filter[contacts][searchTerm]

string

-

filter[contacts][includeArchived]

boolean

-

Sort Parameters

Name Value

sort[contacts][country]

asc/desc

sort[contacts][companyName]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/contacts?filter[contacts][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "contacts",
    "attributes" : {
      "idTag" : null,
      "name" : "Susy Smith",
      "area" : null,
      "association" : null,
      "city" : null,
      "companyName" : null,
      "country" : null,
      "createdDate" : 1575281700412,
      "elevation" : null,
      "email" : null,
      "fax" : null,
      "firstName" : "Susy",
      "gpsLocation" : null,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "lastName" : "Smith",
      "mobile" : null,
      "notes" : null,
      "phone" : null,
      "region" : null,
      "state" : null,
      "street" : null,
      "subRegion" : null,
      "website" : null,
      "zip" : null
    },
    "relationships" : {
      "contactRoles" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/contactRoles",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/contactRoles"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/group"
        }
      }
    }
  } ]
}
PATCH Update an existing contact

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"contacts","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/contacts/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "contacts",
    "attributes" : {
      "idTag" : null,
      "name" : <UPDATED_VALUE>,
      "area" : null,
      "association" : null,
      "city" : null,
      "companyName" : null,
      "country" : null,
      "createdDate" : 1575281700412,
      "elevation" : null,
      "email" : null,
      "fax" : null,
      "firstName" : "Susy",
      "gpsLocation" : null,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "lastName" : "Smith",
      "mobile" : null,
      "notes" : null,
      "phone" : null,
      "region" : null,
      "state" : null,
      "street" : null,
      "subRegion" : null,
      "website" : null,
      "zip" : null
    },
    "relationships" : {
      "contactRoles" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/contactRoles",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/contactRoles"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/group"
        }
      }
    }
  }
}
POST Create a contact

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "contacts", "attributes" : { "firstName" : "Susy", "lastName" : "Smith" }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } } } }}'
     'https://c-sar.cropster.com/api/v2/contacts'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "contacts",
    "attributes" : {
      "idTag" : null,
      "name" : "Susy Smith",
      "area" : null,
      "association" : null,
      "city" : null,
      "companyName" : null,
      "country" : null,
      "createdDate" : 1575281700412,
      "elevation" : null,
      "email" : null,
      "fax" : null,
      "firstName" : "Susy",
      "gpsLocation" : null,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "lastName" : "Smith",
      "mobile" : null,
      "notes" : null,
      "phone" : null,
      "region" : null,
      "state" : null,
      "street" : null,
      "subRegion" : null,
      "website" : null,
      "zip" : null
    },
    "relationships" : {
      "contactRoles" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/contactRoles",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/contactRoles"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/contacts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/contacts/id/group"
        }
      }
    }
  }
}

Locations

Type name: locations

A location represents a geographical location, usually an address. For example, a warehouse has an associated location. A lot may also reside in a certain location.

Attributes

Name Type Constraints Notes

name

string

-

-

city

string

-

-

country

country

-

-

street

string

-

-

zip

string

-

-

Relationships

Name Constraints Notes

group

required
init only

Can only be set upon creation of the object.

DELETE Delete a specific location

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/locations/<ID>'

Response body

N/A
GET Get multiple specific locations

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/locations/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "locations",
    "attributes" : {
      "name" : null,
      "city" : null,
      "country" : null,
      "street" : null,
      "zip" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/locations/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/locations/id/group"
        }
      }
    }
  } ]
}
GET Get a specific location

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/locations/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "locations",
    "attributes" : {
      "name" : null,
      "city" : null,
      "country" : null,
      "street" : null,
      "zip" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/locations/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/locations/id/group"
        }
      }
    }
  }
}
GET List all locations

Filter Parameters

Name Type Constraints Note

filter[locations][group]

string

required

-

filter[locations][locationType]

string

-

Repeatable, objects must match at least one. Filtering by null will include all locations without a defined type.

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/locations?filter[locations][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "locations",
    "attributes" : {
      "name" : null,
      "city" : null,
      "country" : null,
      "street" : null,
      "zip" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/locations/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/locations/id/group"
        }
      }
    }
  } ]
}
PATCH Update an existing location

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"locations","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/locations/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "locations",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "city" : null,
      "country" : null,
      "street" : null,
      "zip" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/locations/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/locations/id/group"
        }
      }
    }
  }
}
POST Create a location

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "locations", "attributes" : { }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } } } }}'
     'https://c-sar.cropster.com/api/v2/locations'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "locations",
    "attributes" : {
      "name" : null,
      "city" : null,
      "country" : null,
      "street" : null,
      "zip" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/locations/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/locations/id/group"
        }
      }
    }
  }
}

Order

Orderable Products

Type name: orderableProducts

orderableProducts refer to the goods that you produce and sell to other parties. productionOrders will reference these products via the items of an order, namely productionOrderItems.

A product can either represent one individual good, or it is a bundle of multiple products. An individual product needs to refer to either a profile or a blendProfile, should the product be a blend. It’s illegal to populate both relationships.

A product bundle in contrast will refer to multiple individual products via its bundleItems relationship but must not refer to a profile or blendProfile itself. If a product is an item of some product bundle, it must not refer to bundleItems again, but a product can act as both a bundle item and an individual product.

Note that a unique SKU number would have to be set on the order item, rather than the product. This is to simplify the handling of different variants of products (e.g. different package sizes).

Attributes

Name Type Constraints Notes

name

string

-

-

externalId

string

-

ID of this product in an external system.

isIgnored

boolean

-

Products that were synchronized with an external system (e.g. Shopify, but are irrelevant on the Cropster side, shall be ignored.

isPostRoastBlend

boolean

read only

true if a blendProfile is referenced, otherwise false.

isProductBundle

boolean

-

If set to true then bundleItems must be referenced, else a profile or blendProfile must be referenced, e.g. false.

isUnreviewed

boolean

-

New products from an external system will be marked as unreviewed.

onHandInventory

measure

-

Weight of the product that you have readily available.

Relationships

Name Constraints Notes

blendProfile

-

-

bundleItems

-

Reference to other orderableProducts if this product is a product bundle. A bundle item cannot reference bundleItems again.

group

required
init only

-

profile

-

-

DELETE Delete a specific orderableProduct

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/orderableProducts/<ID>'

Response body

N/A
GET Get multiple specific orderableProducts

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/orderableProducts/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "orderableProducts",
    "attributes" : {
      "name" : null,
      "externalId" : null,
      "isIgnored" : null,
      "isPostRoastBlend" : true,
      "isProductBundle" : false,
      "isUnreviewed" : null,
      "onHandInventory" : null
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/blendProfile"
        }
      },
      "bundleItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/bundleItems",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/bundleItems"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/group"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/profile"
        }
      }
    }
  } ]
}
GET Get a specific orderableProduct

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/orderableProducts/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "orderableProducts",
    "attributes" : {
      "name" : null,
      "externalId" : null,
      "isIgnored" : null,
      "isPostRoastBlend" : true,
      "isProductBundle" : false,
      "isUnreviewed" : null,
      "onHandInventory" : null
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/blendProfile"
        }
      },
      "bundleItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/bundleItems",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/bundleItems"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/group"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/profile"
        }
      }
    }
  }
}
GET List all orderableProducts

Filter Parameters

Name Type Constraints Notes

filter[orderableProducts][group]

string

required

filter[orderableProducts][isExternal]

boolean

-

filter[orderableProducts][isIgnored]

boolean

-

filter[orderableProducts][isUnreviewed]

boolean

-

filter[orderableProducts][shopIntegration]

string

-

filter[orderableProducts][externalId]

string

-

filter[orderableProducts][isProductBundle]

boolean

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/orderableProducts?filter[orderableProducts][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "orderableProducts",
    "attributes" : {
      "name" : null,
      "externalId" : null,
      "isIgnored" : null,
      "isPostRoastBlend" : true,
      "isProductBundle" : false,
      "isUnreviewed" : null,
      "onHandInventory" : null
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/blendProfile"
        }
      },
      "bundleItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/bundleItems",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/bundleItems"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/group"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/profile"
        }
      }
    }
  } ]
}
PATCH Update an existing orderableProduct

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"orderableProducts","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/orderableProducts/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "orderableProducts",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "externalId" : null,
      "isIgnored" : null,
      "isPostRoastBlend" : true,
      "isProductBundle" : false,
      "isUnreviewed" : null,
      "onHandInventory" : null
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/blendProfile"
        }
      },
      "bundleItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/bundleItems",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/bundleItems"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/group"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/profile"
        }
      }
    }
  }
}
POST Create a orderableProduct

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "orderableProducts", "attributes" : { "isProductBundle" : false }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } } } }}'
     'https://c-sar.cropster.com/api/v2/orderableProducts'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "orderableProducts",
    "attributes" : {
      "name" : null,
      "externalId" : null,
      "isIgnored" : null,
      "isPostRoastBlend" : true,
      "isProductBundle" : false,
      "isUnreviewed" : null,
      "onHandInventory" : null
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/blendProfile"
        }
      },
      "bundleItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/bundleItems",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/bundleItems"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/group"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/orderableProducts/id/profile"
        }
      }
    }
  }
}

Production Order Items

Type name: productionOrderItems

Represents the items (aka line items) in productionOrders. Should products have different variants, they need to be distinguished by a unique SKU number which needs to be set on this order item object.

Attributes

Name Type Constraints Notes

format

format

-

-

quantity

measure

-

-

sku

string

-

Unique SKU of the ordered item.

variantInfo

string

read only

Information about the product variant as string. Set by the server if applicable.

Relationships

Name Constraints Notes

orderableProduct

required

-

productionOrder

required
init only

-

DELETE Delete a specific productionOrderItem

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/productionOrderItems/<ID>'

Response body

N/A
GET Get multiple specific productionOrderItems

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/productionOrderItems/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "productionOrderItems",
    "attributes" : {
      "format" : null,
      "quantity" : null,
      "sku" : null,
      "variantInfo" : "variantInfo"
    },
    "relationships" : {
      "orderableProduct" : {
        "data" : {
          "id" : "AAAA",
          "type" : "orderableProducts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/orderableProduct",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/orderableProduct"
        }
      },
      "productionOrder" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productionOrders"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/productionOrder",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/productionOrder"
        }
      }
    }
  } ]
}
GET Get a specific productionOrderItem

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/productionOrderItems/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "productionOrderItems",
    "attributes" : {
      "format" : null,
      "quantity" : null,
      "sku" : null,
      "variantInfo" : "variantInfo"
    },
    "relationships" : {
      "orderableProduct" : {
        "data" : {
          "id" : "AAAA",
          "type" : "orderableProducts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/orderableProduct",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/orderableProduct"
        }
      },
      "productionOrder" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productionOrders"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/productionOrder",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/productionOrder"
        }
      }
    }
  }
}
GET List all productionOrderItems

Filter Parameters

Name Type Constraints Notes

filter[productionOrderItems][group]

string

required

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/productionOrderItems?filter[productionOrderItems][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "productionOrderItems",
    "attributes" : {
      "format" : null,
      "quantity" : null,
      "sku" : null,
      "variantInfo" : "variantInfo"
    },
    "relationships" : {
      "orderableProduct" : {
        "data" : {
          "id" : "AAAA",
          "type" : "orderableProducts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/orderableProduct",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/orderableProduct"
        }
      },
      "productionOrder" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productionOrders"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/productionOrder",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/productionOrder"
        }
      }
    }
  } ]
}
PATCH Update an existing productionOrderItem

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"productionOrderItems","attributes":{"format":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/productionOrderItems/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "productionOrderItems",
    "attributes" : {
      "format" : <UPDATED_VALUE>,
      "quantity" : null,
      "sku" : null,
      "variantInfo" : "variantInfo"
    },
    "relationships" : {
      "orderableProduct" : {
        "data" : {
          "id" : "AAAA",
          "type" : "orderableProducts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/orderableProduct",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/orderableProduct"
        }
      },
      "productionOrder" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productionOrders"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/productionOrder",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/productionOrder"
        }
      }
    }
  }
}
POST Create a productionOrderItem

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "productionOrderItems", "attributes" : { }, "relationships" : { "orderableProduct" : { "data" : { "id" : "AAAA", "type" : "orderableProducts" } }, "productionOrder" : { "data" : { "id" : "AAAA", "type" : "productionOrders" } } } }}'
     'https://c-sar.cropster.com/api/v2/productionOrderItems'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "productionOrderItems",
    "attributes" : {
      "format" : null,
      "quantity" : null,
      "sku" : null,
      "variantInfo" : "variantInfo"
    },
    "relationships" : {
      "orderableProduct" : {
        "data" : {
          "id" : "AAAA",
          "type" : "orderableProducts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/orderableProduct",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/orderableProduct"
        }
      },
      "productionOrder" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productionOrders"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/relationships/productionOrder",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrderItems/id/productionOrder"
        }
      }
    }
  }
}

Production Orders

Type name: productionOrders

Represents an order issued by one of your customers, referring to your orderableProducts via productionOrderItems.

Attributes

Name Type Constraints Notes

idTag

string

read only

-

created

dateTime

read only

-

customer

string

-

-

customerType

customerType

-

-

externalId

string

read only

ID of this order in an external system. Cannot be set by the client.

externalReference

string

-

ID of this order in an external system.

externalStatus

externalOrderStatus

read only

Status of this order as per the external system, e.g. OPEN.

isArchived

boolean

-

-

isStatusManuallyChanged

boolean

read only

true if a user manually changed the order’s status.

lastModifiedDate

dateTime

read only

-

lastStatusChangeDate

dateTime

read only

timestamp of the last change of the order’s status.

orderDate

dateTime

-

-

salesPerson

string

-

-

status

productionOrderStatus

required

Status of this order in Cropster.

Relationships

Name Constraints Notes

createdBy

read only

-

group

required
init only

-

productionOrderItems

read only

-

GET Get multiple specific productionOrders

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/productionOrders/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "productionOrders",
    "attributes" : {
      "idTag" : "idTag",
      "created" : 1575281700412,
      "customer" : null,
      "customerType" : null,
      "externalId" : "externalId",
      "externalReference" : null,
      "externalStatus" : "OPEN",
      "isArchived" : null,
      "isStatusManuallyChanged" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "orderDate" : null,
      "salesPerson" : null,
      "status" : "RECEIVED"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/group"
        }
      },
      "productionOrderItems" : {
        "data" : [ {
          "type" : "productionOrderItems",
          "id" : "AAAA"
        }, {
          "type" : "productionOrderItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/productionOrderItems",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/productionOrderItems"
        }
      }
    }
  } ]
}
GET Get a specific productionOrder

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/productionOrders/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "productionOrders",
    "attributes" : {
      "idTag" : "idTag",
      "created" : 1575281700412,
      "customer" : null,
      "customerType" : null,
      "externalId" : "externalId",
      "externalReference" : null,
      "externalStatus" : "OPEN",
      "isArchived" : null,
      "isStatusManuallyChanged" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "orderDate" : null,
      "salesPerson" : null,
      "status" : "RECEIVED"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/group"
        }
      },
      "productionOrderItems" : {
        "data" : [ {
          "type" : "productionOrderItems",
          "id" : "AAAA"
        }, {
          "type" : "productionOrderItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/productionOrderItems",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/productionOrderItems"
        }
      }
    }
  }
}
GET List all productionOrders

Filter Parameters

Name Type Constraints Notes

filter[productionOrders][group]

string

required

filter[productionOrders][idTag]

string

-

filter[productionOrders][includeArchived]

boolean

-

filter[productionOrders][created.from]

dateTime

-

filter[productionOrders][created.to]

dateTime

-

filter[productionOrders][status]

productionOrderStatus

-

filter[productionOrders][externalId]

string

-

filter[productionOrders][externalReference]

string

-

filter[productionOrders][isExternal]

boolean

-

filter[productionOrders][externalStatus]

externalOrderStatus

-

filter[productionOrders][shopIntegration]

string

-

filter[productionOrders][orderDate.from]

dateTime

-

filter[productionOrders][orderDate.to]

dateTime

-

filter[productionOrders][lastStatusChangeDate.from]

dateTime

-

filter[productionOrders][lastStatusChangeDate.to]

dateTime

-

filter[productionOrders][salesPerson]

string

-

filter[productionOrders][customer]

string

-

filter[productionOrders][item]

string

-

Sort Parameters

Name Value

sort[productionOrders][externalReference]

asc/desc

sort[productionOrders][customerType]

asc/desc

sort[productionOrders][created]

asc/desc

sort[productionOrders][idTag]

asc/desc

sort[productionOrders][externalId]

asc/desc

sort[productionOrders][id]

asc/desc

sort[productionOrders][salesPerson]

asc/desc

sort[productionOrders][orderDate]

asc/desc

sort[productionOrders][status]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/productionOrders?filter[productionOrders][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "productionOrders",
    "attributes" : {
      "idTag" : "idTag",
      "created" : 1575281700412,
      "customer" : null,
      "customerType" : null,
      "externalId" : "externalId",
      "externalReference" : null,
      "externalStatus" : "OPEN",
      "isArchived" : null,
      "isStatusManuallyChanged" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "orderDate" : null,
      "salesPerson" : null,
      "status" : "RECEIVED"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/group"
        }
      },
      "productionOrderItems" : {
        "data" : [ {
          "type" : "productionOrderItems",
          "id" : "AAAA"
        }, {
          "type" : "productionOrderItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/productionOrderItems",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/productionOrderItems"
        }
      }
    }
  } ]
}
PATCH Update an existing productionOrder

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"productionOrders","attributes":{"customer":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/productionOrders/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "productionOrders",
    "attributes" : {
      "idTag" : "idTag",
      "created" : 1575281700412,
      "customer" : <UPDATED_VALUE>,
      "customerType" : null,
      "externalId" : "externalId",
      "externalReference" : null,
      "externalStatus" : "OPEN",
      "isArchived" : null,
      "isStatusManuallyChanged" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "orderDate" : null,
      "salesPerson" : null,
      "status" : "RECEIVED"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/group"
        }
      },
      "productionOrderItems" : {
        "data" : [ {
          "type" : "productionOrderItems",
          "id" : "AAAA"
        }, {
          "type" : "productionOrderItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/productionOrderItems",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/productionOrderItems"
        }
      }
    }
  }
}
POST Create a productionOrder

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "productionOrders", "attributes" : { "status" : "RECEIVED" }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } } } }}'
     'https://c-sar.cropster.com/api/v2/productionOrders'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "productionOrders",
    "attributes" : {
      "idTag" : "idTag",
      "created" : 1575281700412,
      "customer" : null,
      "customerType" : null,
      "externalId" : "externalId",
      "externalReference" : null,
      "externalStatus" : "OPEN",
      "isArchived" : null,
      "isStatusManuallyChanged" : true,
      "lastModifiedDate" : 1575281700412,
      "lastStatusChangeDate" : 1575281700412,
      "orderDate" : null,
      "salesPerson" : null,
      "status" : "RECEIVED"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/group"
        }
      },
      "productionOrderItems" : {
        "data" : [ {
          "type" : "productionOrderItems",
          "id" : "AAAA"
        }, {
          "type" : "productionOrderItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/productionOrders/id/relationships/productionOrderItems",
          "related" : "https://c-sar.cropster.com/api/v2/productionOrders/id/productionOrderItems"
        }
      }
    }
  }
}

Origin

Batch Mixes

Type name: batchMixes

Batch mixes are groups of one or more batches that all possess the same process. The purpose of batch mixes is to aggregate the weights of the component batches, so they may be converted into inventory lots.

Batch mixes may only be converted into lots if each of the component batches has its intermediateWeight defined. Batches may not be added to a batch mix that has already been converted to a lot.

Attributes

Name Type Constraints Notes

name

string

-

-

isActive

boolean

read only

-

isCommitted

boolean

read only

-

Relationships

Name Constraints Notes

batches

-

-

createdBy

read only

-

group

-

-

lastModifiedBy

read only

-

lot

-

-

DELETE Delete a specific batchMix

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/batchMixes/<ID>'

Response body

N/A
GET Get multiple specific batchMixes

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/batchMixes/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "batchMixes",
    "attributes" : {
      "name" : null,
      "isActive" : true,
      "isCommitted" : true
    },
    "relationships" : {
      "batches" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/batches"
        }
      },
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/createdBy"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lastModifiedBy"
        }
      },
      "lot" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lot"
        }
      }
    }
  } ]
}
GET Get a specific batchMix

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/batchMixes/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "batchMixes",
    "attributes" : {
      "name" : null,
      "isActive" : true,
      "isCommitted" : true
    },
    "relationships" : {
      "batches" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/batches"
        }
      },
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/createdBy"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lastModifiedBy"
        }
      },
      "lot" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lot"
        }
      }
    }
  }
}
GET List all batchMixes

Filter Parameters

Name Type Constraints Notes

filter[batchMixes][group]

string

required

filter[batchMixes][batches]

string

-

filter[batchMixes][name]

string

-

filter[batchMixes][batches.process]

string

-

filter[batchMixes][isCommitted]

boolean

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/batchMixes?filter[batchMixes][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "batchMixes",
    "attributes" : {
      "name" : null,
      "isActive" : true,
      "isCommitted" : true
    },
    "relationships" : {
      "batches" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/batches"
        }
      },
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/createdBy"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lastModifiedBy"
        }
      },
      "lot" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lot"
        }
      }
    }
  } ]
}
PATCH Update an existing batchMix

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"batchMixes","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/batchMixes/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "batchMixes",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "isActive" : true,
      "isCommitted" : true
    },
    "relationships" : {
      "batches" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/batches"
        }
      },
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/createdBy"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lastModifiedBy"
        }
      },
      "lot" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lot"
        }
      }
    }
  }
}
POST Create a batchMix

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "batchMixes", "attributes" : { "name" : "name" }, "relationships" : { } }}'
     'https://c-sar.cropster.com/api/v2/batchMixes'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "batchMixes",
    "attributes" : {
      "name" : "name",
      "isActive" : true,
      "isCommitted" : true
    },
    "relationships" : {
      "batches" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/batches"
        }
      },
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/createdBy"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lastModifiedBy"
        }
      },
      "lot" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batchMixes/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/batchMixes/id/lot"
        }
      }
    }
  }
}

Batches

Type name: batches

An amount of coffee that is processed together is called a batch. One or more batches are created during the reception of coffee at a processing facility. Batches must be assigned a process which creates an estimated yield based on the receivedWeight.

Subsequently, when processing is complete, the actual yield may be recorded as the intermediateWeight. Afterwards, one or more batches are aggregated into a batch mix before being converted to a lot.

Attributes

Name Type Constraints Notes

idTag

string

-

-

active

boolean

-

-

cropYear

string

-

-

finalWeight

measure

-

-

finalWeightOverride

measure

-

-

harvestDate

localDate

-

-

intermediateWeight

measure

-

-

intermediateWeightSourceOverride

measure

-

-

intermediateWeightTargetOverride

measure

-

-

isPiled

boolean

-

If set to true, the batch won’t get weighed again and the weight of later processing forms should be calculated by the application, e.g. false.

millingDate

localDate

-

-

notes

string

-

-

part

string

-

-

partName

string

-

-

receivedWeight

measure

-

-

receivedWeightOverride

measure

-

-

receptionDate

localDate

-

-

storageDate

localDate

-

-

Relationships

Name Constraints Notes

batchMix

-

-

community

-

-

facility

-

-

farm

-

-

field

-

-

group

-

-

process

-

-

project

-

-

reception

-

-

sample

-

-

stageRecords

read only

-

varieties

-

-

DELETE Delete a specific batch

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/batches/<ID>'

Response body

N/A
GET Get multiple specific batches

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/batches/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "batches",
    "attributes" : {
      "idTag" : null,
      "active" : null,
      "cropYear" : null,
      "finalWeight" : null,
      "finalWeightOverride" : null,
      "harvestDate" : null,
      "intermediateWeight" : null,
      "intermediateWeightSourceOverride" : null,
      "intermediateWeightTargetOverride" : null,
      "isPiled" : false,
      "millingDate" : null,
      "notes" : null,
      "part" : null,
      "partName" : null,
      "receivedWeight" : null,
      "receivedWeightOverride" : null,
      "receptionDate" : null,
      "storageDate" : null
    },
    "relationships" : {
      "batchMix" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/batchMix",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/batchMix"
        }
      },
      "community" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/community",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/community"
        }
      },
      "facility" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/facility"
        }
      },
      "farm" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/farm",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/farm"
        }
      },
      "field" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/field",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/field"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/group"
        }
      },
      "process" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/process"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/project"
        }
      },
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/reception"
        }
      },
      "sample" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/sample",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/sample"
        }
      },
      "stageRecords" : {
        "data" : [ {
          "type" : "stageRecords",
          "id" : "AAAA"
        }, {
          "type" : "stageRecords",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/stageRecords",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/stageRecords"
        }
      },
      "varieties" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/varieties",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/varieties"
        }
      }
    }
  } ]
}
GET Get a specific batch

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/batches/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "batches",
    "attributes" : {
      "idTag" : null,
      "active" : null,
      "cropYear" : null,
      "finalWeight" : null,
      "finalWeightOverride" : null,
      "harvestDate" : null,
      "intermediateWeight" : null,
      "intermediateWeightSourceOverride" : null,
      "intermediateWeightTargetOverride" : null,
      "isPiled" : false,
      "millingDate" : null,
      "notes" : null,
      "part" : null,
      "partName" : null,
      "receivedWeight" : null,
      "receivedWeightOverride" : null,
      "receptionDate" : null,
      "storageDate" : null
    },
    "relationships" : {
      "batchMix" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/batchMix",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/batchMix"
        }
      },
      "community" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/community",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/community"
        }
      },
      "facility" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/facility"
        }
      },
      "farm" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/farm",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/farm"
        }
      },
      "field" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/field",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/field"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/group"
        }
      },
      "process" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/process"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/project"
        }
      },
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/reception"
        }
      },
      "sample" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/sample",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/sample"
        }
      },
      "stageRecords" : {
        "data" : [ {
          "type" : "stageRecords",
          "id" : "AAAA"
        }, {
          "type" : "stageRecords",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/stageRecords",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/stageRecords"
        }
      },
      "varieties" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/varieties",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/varieties"
        }
      }
    }
  }
}
GET List all batches

Filter Parameters

Name Type Constraints Notes

filter[batches][group]

string

required

filter[batches][project]

string

-

filter[batches][idTag]

string

-

filter[batches][lastModifiedDate.from]

dateTime

-

filter[batches][lastModifiedDate.to]

dateTime

-

filter[batches][process.processingMethod]

processingMethod

-

filter[batches][receptionDate.from]

localDate

-

filter[batches][receptionDate.to]

localDate

-

filter[batches][varieties]

string

-

filter[batches][process]

string

-

filter[batches][facility]

string

-

filter[batches][community]

string

-

filter[batches][farm]

string

-

filter[batches][part]

string

-

filter[batches][field]

string

-

filter[batches][reception.receptionItems.source]

string

-

filter[batches][batchMix]

string

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/batches?filter[batches][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "batches",
    "attributes" : {
      "idTag" : null,
      "active" : null,
      "cropYear" : null,
      "finalWeight" : null,
      "finalWeightOverride" : null,
      "harvestDate" : null,
      "intermediateWeight" : null,
      "intermediateWeightSourceOverride" : null,
      "intermediateWeightTargetOverride" : null,
      "isPiled" : false,
      "millingDate" : null,
      "notes" : null,
      "part" : null,
      "partName" : null,
      "receivedWeight" : null,
      "receivedWeightOverride" : null,
      "receptionDate" : null,
      "storageDate" : null
    },
    "relationships" : {
      "batchMix" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/batchMix",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/batchMix"
        }
      },
      "community" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/community",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/community"
        }
      },
      "facility" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/facility"
        }
      },
      "farm" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/farm",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/farm"
        }
      },
      "field" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/field",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/field"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/group"
        }
      },
      "process" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/process"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/project"
        }
      },
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/reception"
        }
      },
      "sample" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/sample",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/sample"
        }
      },
      "stageRecords" : {
        "data" : [ {
          "type" : "stageRecords",
          "id" : "AAAA"
        }, {
          "type" : "stageRecords",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/stageRecords",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/stageRecords"
        }
      },
      "varieties" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/varieties",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/varieties"
        }
      }
    }
  } ]
}
PATCH Update an existing batch

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"batches","attributes":{"active":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/batches/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "batches",
    "attributes" : {
      "idTag" : null,
      "active" : <UPDATED_VALUE>,
      "cropYear" : null,
      "finalWeight" : null,
      "finalWeightOverride" : null,
      "harvestDate" : null,
      "intermediateWeight" : null,
      "intermediateWeightSourceOverride" : null,
      "intermediateWeightTargetOverride" : null,
      "isPiled" : false,
      "millingDate" : null,
      "notes" : null,
      "part" : null,
      "partName" : null,
      "receivedWeight" : null,
      "receivedWeightOverride" : null,
      "receptionDate" : null,
      "storageDate" : null
    },
    "relationships" : {
      "batchMix" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/batchMix",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/batchMix"
        }
      },
      "community" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/community",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/community"
        }
      },
      "facility" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/facility"
        }
      },
      "farm" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/farm",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/farm"
        }
      },
      "field" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/field",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/field"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/group"
        }
      },
      "process" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/process"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/project"
        }
      },
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/reception"
        }
      },
      "sample" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/sample",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/sample"
        }
      },
      "stageRecords" : {
        "data" : [ {
          "type" : "stageRecords",
          "id" : "AAAA"
        }, {
          "type" : "stageRecords",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/stageRecords",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/stageRecords"
        }
      },
      "varieties" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/varieties",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/varieties"
        }
      }
    }
  }
}
POST Create a batch

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "batches", "attributes" : { "isPiled" : false }, "relationships" : { } }}'
     'https://c-sar.cropster.com/api/v2/batches'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "batches",
    "attributes" : {
      "idTag" : null,
      "active" : null,
      "cropYear" : null,
      "finalWeight" : null,
      "finalWeightOverride" : null,
      "harvestDate" : null,
      "intermediateWeight" : null,
      "intermediateWeightSourceOverride" : null,
      "intermediateWeightTargetOverride" : null,
      "isPiled" : false,
      "millingDate" : null,
      "notes" : null,
      "part" : null,
      "partName" : null,
      "receivedWeight" : null,
      "receivedWeightOverride" : null,
      "receptionDate" : null,
      "storageDate" : null
    },
    "relationships" : {
      "batchMix" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/batchMix",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/batchMix"
        }
      },
      "community" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/community",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/community"
        }
      },
      "facility" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/facility"
        }
      },
      "farm" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/farm",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/farm"
        }
      },
      "field" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/field",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/field"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/group"
        }
      },
      "process" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/process"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/project"
        }
      },
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/reception"
        }
      },
      "sample" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/sample",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/sample"
        }
      },
      "stageRecords" : {
        "data" : [ {
          "type" : "stageRecords",
          "id" : "AAAA"
        }, {
          "type" : "stageRecords",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/stageRecords",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/stageRecords"
        }
      },
      "varieties" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/batches/id/relationships/varieties",
          "related" : "https://c-sar.cropster.com/api/v2/batches/id/varieties"
        }
      }
    }
  }
}

Facilities

Type name: facilities

Facilities are places where coffee is processed, represented as a contact.

Attributes

Name Type Constraints Notes

acronym

string

required

This is a unique (within a group) 2 or 3 alphabetical prefix that identifies the relationship between the mill contact and the facility manager. This prefix becomes part of the ID tag for batches registered by the facility manager.

isActive

boolean

read only

-

Relationships

Name Constraints Notes

contact

required

This contact must have either the Wet Mill or Dry Mill contact role.

facilityManager

required

This is a user who has permission to create batches for this facility.

group

required

-

DELETE Delete a specific facility

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/facilities/<ID>'

Response body

N/A
GET Get multiple specific facilities

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/facilities/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "facilities",
    "attributes" : {
      "acronym" : "acronym",
      "isActive" : true
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/contact"
        }
      },
      "facilityManager" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/facilityManager",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/facilityManager"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/group"
        }
      }
    }
  } ]
}
GET Get a specific facility

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/facilities/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "facilities",
    "attributes" : {
      "acronym" : "acronym",
      "isActive" : true
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/contact"
        }
      },
      "facilityManager" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/facilityManager",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/facilityManager"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/group"
        }
      }
    }
  }
}
GET List all facilities

Filter Parameters

Name Type Constraints Notes

filter[facilities][group]

string

required

filter[facilities][lastModifiedDate.from]

dateTime

-

filter[facilities][lastModifiedDate.to]

dateTime

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/facilities?filter[facilities][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "facilities",
    "attributes" : {
      "acronym" : "acronym",
      "isActive" : true
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/contact"
        }
      },
      "facilityManager" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/facilityManager",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/facilityManager"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/group"
        }
      }
    }
  } ]
}
PATCH Update an existing facility

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"facilities","attributes":{"acronym":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/facilities/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "facilities",
    "attributes" : {
      "acronym" : <UPDATED_VALUE>,
      "isActive" : true
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/contact"
        }
      },
      "facilityManager" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/facilityManager",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/facilityManager"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/group"
        }
      }
    }
  }
}
POST Create a facility

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "facilities", "attributes" : { "acronym" : "acronym" }, "relationships" : { "contact" : { "data" : { "id" : "AAAA", "type" : "contacts" } }, "facilityManager" : { "data" : { "id" : "AAAA", "type" : "users" } }, "group" : { "data" : { "id" : "AAAA", "type" : "groups" } } } }}'
     'https://c-sar.cropster.com/api/v2/facilities'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "facilities",
    "attributes" : {
      "acronym" : "acronym",
      "isActive" : true
    },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/contact"
        }
      },
      "facilityManager" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/facilityManager",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/facilityManager"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/facilities/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/facilities/id/group"
        }
      }
    }
  }
}

Processes

Type name: processes

Processes are the methods used change the coffee form from cherry into green. Each batch must have an associated process.

The most common processing method is WASHED, which involves depulping the cherry at a facility called a "wet mill". The resulting coffee form is called "parchment", and will be fermented for a few hours and then dried over a few weeks, after which the coffee is stored. Finally, the dry parchment will be hulled, graded and sorted into green coffee ready to be roasted.

Attributes

Name Type Constraints Notes

name

string

-

-

created

dateTime

read only

-

finalForm

coffeeForm

-

-

finalWeight

measure

-

Combined with the intermediate weight source, this can be used to calculate the yield factor between the intermediate and final coffee forms.

intermediateForm

coffeeForm

-

-

intermediateWeightSource

measure

-

This divided by the final weight can be used to calculate the yield factor between the intermediate and final coffee forms, which is used to estimate weight changes between forms.

intermediateWeightTarget

measure

-

Combined with the received weight, this can be used to calculate the yield factor between the received and intermediate coffee forms.

isActive

boolean

read only

-

lastModified

dateTime

read only

-

processingMethod

processingMethod

-

-

receivedForm

coffeeForm

-

-

receivedWeight

measure

-

This divided by the intermediate target weight results in the yield factor between the received and intermediate coffee forms, which is used to estimate weight changes between forms.

Relationships

Name Constraints Notes

group

-

-

stages

read only

-

DELETE Delete a specific process

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processes/<ID>'

Response body

N/A
GET Get multiple specific processes

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processes/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "processes",
    "attributes" : {
      "name" : null,
      "created" : 1575281700412,
      "finalForm" : null,
      "finalWeight" : null,
      "intermediateForm" : null,
      "intermediateWeightSource" : null,
      "intermediateWeightTarget" : null,
      "isActive" : true,
      "lastModified" : 1575281700412,
      "processingMethod" : null,
      "receivedForm" : null,
      "receivedWeight" : null
    },
    "relationships" : {
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/group"
        }
      },
      "stages" : {
        "data" : [ {
          "type" : "stages",
          "id" : "AAAA"
        }, {
          "type" : "stages",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/stages",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/stages"
        }
      }
    }
  } ]
}
GET Get a specific process

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processes/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processes",
    "attributes" : {
      "name" : null,
      "created" : 1575281700412,
      "finalForm" : null,
      "finalWeight" : null,
      "intermediateForm" : null,
      "intermediateWeightSource" : null,
      "intermediateWeightTarget" : null,
      "isActive" : true,
      "lastModified" : 1575281700412,
      "processingMethod" : null,
      "receivedForm" : null,
      "receivedWeight" : null
    },
    "relationships" : {
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/group"
        }
      },
      "stages" : {
        "data" : [ {
          "type" : "stages",
          "id" : "AAAA"
        }, {
          "type" : "stages",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/stages",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/stages"
        }
      }
    }
  }
}
GET List all processes

Filter Parameters

Name Type Constraints Notes

filter[processes][group]

string

required

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/processes?filter[processes][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "processes",
    "attributes" : {
      "name" : null,
      "created" : 1575281700412,
      "finalForm" : null,
      "finalWeight" : null,
      "intermediateForm" : null,
      "intermediateWeightSource" : null,
      "intermediateWeightTarget" : null,
      "isActive" : true,
      "lastModified" : 1575281700412,
      "processingMethod" : null,
      "receivedForm" : null,
      "receivedWeight" : null
    },
    "relationships" : {
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/group"
        }
      },
      "stages" : {
        "data" : [ {
          "type" : "stages",
          "id" : "AAAA"
        }, {
          "type" : "stages",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/stages",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/stages"
        }
      }
    }
  } ]
}
PATCH Update an existing process

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"processes","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/processes/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "processes",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "created" : 1575281700412,
      "finalForm" : null,
      "finalWeight" : null,
      "intermediateForm" : null,
      "intermediateWeightSource" : null,
      "intermediateWeightTarget" : null,
      "isActive" : true,
      "lastModified" : 1575281700412,
      "processingMethod" : null,
      "receivedForm" : null,
      "receivedWeight" : null
    },
    "relationships" : {
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/group"
        }
      },
      "stages" : {
        "data" : [ {
          "type" : "stages",
          "id" : "AAAA"
        }, {
          "type" : "stages",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/stages",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/stages"
        }
      }
    }
  }
}
POST Create a process

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "processes", "attributes" : { "name" : "name" }, "relationships" : { } }}'
     'https://c-sar.cropster.com/api/v2/processes'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processes",
    "attributes" : {
      "name" : "name",
      "created" : 1575281700412,
      "finalForm" : null,
      "finalWeight" : null,
      "intermediateForm" : null,
      "intermediateWeightSource" : null,
      "intermediateWeightTarget" : null,
      "isActive" : true,
      "lastModified" : 1575281700412,
      "processingMethod" : null,
      "receivedForm" : null,
      "receivedWeight" : null
    },
    "relationships" : {
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/group"
        }
      },
      "stages" : {
        "data" : [ {
          "type" : "stages",
          "id" : "AAAA"
        }, {
          "type" : "stages",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processes/id/relationships/stages",
          "related" : "https://c-sar.cropster.com/api/v2/processes/id/stages"
        }
      }
    }
  }
}

Reception Items

Type name: receptionItems

Reception items are deliveries of unprocessed or partially processed coffee from individual sources.

Attributes

Name Type Constraints Notes

grossWeight

measure

-

-

isActive

boolean

read only

This is set to false when the reception is deleted.

part

string

-

-

partName

string

-

-

price

monetaryValue

-

-

priceBase

measure

-

-

weight

measure

required

-

Relationships

Name Constraints Notes

reception

-

-

source

-

A contact, the source of the coffee.

sourceRole

-

The source must have a contact role named Community, Farm, Field, or Picker.

DELETE Delete a specific receptionItem

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/receptionItems/<ID>'

Response body

N/A
GET Get multiple specific receptionItems

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/receptionItems/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "receptionItems",
    "attributes" : {
      "grossWeight" : null,
      "isActive" : true,
      "part" : null,
      "partName" : null,
      "price" : null,
      "priceBase" : null,
      "weight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/reception"
        }
      },
      "source" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/source",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/source"
        }
      },
      "sourceRole" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/sourceRole",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/sourceRole"
        }
      }
    }
  } ]
}
GET Get a specific receptionItem

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/receptionItems/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "receptionItems",
    "attributes" : {
      "grossWeight" : null,
      "isActive" : true,
      "part" : null,
      "partName" : null,
      "price" : null,
      "priceBase" : null,
      "weight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/reception"
        }
      },
      "source" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/source",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/source"
        }
      },
      "sourceRole" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/sourceRole",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/sourceRole"
        }
      }
    }
  }
}
GET List all receptionItems

Filter Parameters

Name Type Constraints Notes

filter[receptionItems][group]

string

required

filter[receptionItems][lastModifiedDate.from]

dateTime

-

filter[receptionItems][lastModifiedDate.to]

dateTime

-

filter[receptionItems][source]

string

-

filter[receptionItems][reception.receptionDate.from]

localDate

-

filter[receptionItems][reception.receptionDate.to]

localDate

-

filter[receptionItems][reception.batches.cropYear]

string

-

Sort Parameters

Name Value

sort[receptionItems][id]

asc/desc

sort[receptionItems][reception.receptionDate]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/receptionItems?filter[receptionItems][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "receptionItems",
    "attributes" : {
      "grossWeight" : null,
      "isActive" : true,
      "part" : null,
      "partName" : null,
      "price" : null,
      "priceBase" : null,
      "weight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/reception"
        }
      },
      "source" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/source",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/source"
        }
      },
      "sourceRole" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/sourceRole",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/sourceRole"
        }
      }
    }
  } ]
}
PATCH Update an existing receptionItem

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"receptionItems","attributes":{"grossWeight":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/receptionItems/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "receptionItems",
    "attributes" : {
      "grossWeight" : <UPDATED_VALUE>,
      "isActive" : true,
      "part" : null,
      "partName" : null,
      "price" : null,
      "priceBase" : null,
      "weight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/reception"
        }
      },
      "source" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/source",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/source"
        }
      },
      "sourceRole" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/sourceRole",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/sourceRole"
        }
      }
    }
  }
}
POST Create a receptionItem

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "receptionItems", "attributes" : { "weight" : { "amount" : 1, "unit" : "KG", "amountSI" : 1 } }, "relationships" : { } }}'
     'https://c-sar.cropster.com/api/v2/receptionItems'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "receptionItems",
    "attributes" : {
      "grossWeight" : null,
      "isActive" : true,
      "part" : null,
      "partName" : null,
      "price" : null,
      "priceBase" : null,
      "weight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "reception" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/reception",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/reception"
        }
      },
      "source" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/source",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/source"
        }
      },
      "sourceRole" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptionItems/id/relationships/sourceRole",
          "related" : "https://c-sar.cropster.com/api/v2/receptionItems/id/sourceRole"
        }
      }
    }
  }
}

Receptions

Type name: receptions

Receptions are collections of reception items that were received on the same date at the same facility. The weights and prices of the reception items are aggregated at the reception.

The aggregate weight of a reception is divided among one or more batches. Each batch must be linked to the original source of the coffee in order to preserve traceability throughout the supply chain.

Attributes

Name Type Constraints Notes

coffeeForm

coffeeForm

required

-

isActive

boolean

read only

This is set to false when the reception is deleted.

receptionDate

localDate

required

-

Relationships

Name Constraints Notes

batches

read only

-

facility

required

-

group

-

-

receptionItems

read only

-

DELETE Delete a specific reception

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/receptions/<ID>'

Response body

N/A
GET Get multiple specific receptions

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/receptions/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "receptions",
    "attributes" : {
      "coffeeForm" : "CHERRY",
      "isActive" : true,
      "receptionDate" : "2020-01-01"
    },
    "relationships" : {
      "batches" : {
        "data" : [ {
          "type" : "batches",
          "id" : "AAAA"
        }, {
          "type" : "batches",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/batches"
        }
      },
      "facility" : {
        "data" : {
          "id" : "AAAA",
          "type" : "facilities"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/facility"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/group"
        }
      },
      "receptionItems" : {
        "data" : [ {
          "type" : "receptionItems",
          "id" : "AAAA"
        }, {
          "type" : "receptionItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/receptionItems",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/receptionItems"
        }
      }
    }
  } ]
}
GET Get a specific reception

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/receptions/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "receptions",
    "attributes" : {
      "coffeeForm" : "CHERRY",
      "isActive" : true,
      "receptionDate" : "2020-01-01"
    },
    "relationships" : {
      "batches" : {
        "data" : [ {
          "type" : "batches",
          "id" : "AAAA"
        }, {
          "type" : "batches",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/batches"
        }
      },
      "facility" : {
        "data" : {
          "id" : "AAAA",
          "type" : "facilities"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/facility"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/group"
        }
      },
      "receptionItems" : {
        "data" : [ {
          "type" : "receptionItems",
          "id" : "AAAA"
        }, {
          "type" : "receptionItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/receptionItems",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/receptionItems"
        }
      }
    }
  }
}
GET List all receptions

Filter Parameters

Name Type Constraints Notes

filter[receptions][group]

string

required

filter[receptions][lastModifiedDate.from]

dateTime

-

filter[receptions][lastModifiedDate.to]

dateTime

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/receptions?filter[receptions][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "receptions",
    "attributes" : {
      "coffeeForm" : "CHERRY",
      "isActive" : true,
      "receptionDate" : "2020-01-01"
    },
    "relationships" : {
      "batches" : {
        "data" : [ {
          "type" : "batches",
          "id" : "AAAA"
        }, {
          "type" : "batches",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/batches"
        }
      },
      "facility" : {
        "data" : {
          "id" : "AAAA",
          "type" : "facilities"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/facility"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/group"
        }
      },
      "receptionItems" : {
        "data" : [ {
          "type" : "receptionItems",
          "id" : "AAAA"
        }, {
          "type" : "receptionItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/receptionItems",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/receptionItems"
        }
      }
    }
  } ]
}
PATCH Update an existing reception

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"receptions","attributes":{"coffeeForm":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/receptions/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "receptions",
    "attributes" : {
      "coffeeForm" : <UPDATED_VALUE>,
      "isActive" : true,
      "receptionDate" : "2020-01-01"
    },
    "relationships" : {
      "batches" : {
        "data" : [ {
          "type" : "batches",
          "id" : "AAAA"
        }, {
          "type" : "batches",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/batches"
        }
      },
      "facility" : {
        "data" : {
          "id" : "AAAA",
          "type" : "facilities"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/facility"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/group"
        }
      },
      "receptionItems" : {
        "data" : [ {
          "type" : "receptionItems",
          "id" : "AAAA"
        }, {
          "type" : "receptionItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/receptionItems",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/receptionItems"
        }
      }
    }
  }
}
POST Create a reception

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "receptions", "attributes" : { "coffeeForm" : "CHERRY", "receptionDate" : "2020-01-01" }, "relationships" : { "facility" : { "data" : { "id" : "AAAA", "type" : "facilities" } } } }}'
     'https://c-sar.cropster.com/api/v2/receptions'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "receptions",
    "attributes" : {
      "coffeeForm" : "CHERRY",
      "isActive" : true,
      "receptionDate" : "2020-01-01"
    },
    "relationships" : {
      "batches" : {
        "data" : [ {
          "type" : "batches",
          "id" : "AAAA"
        }, {
          "type" : "batches",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/batches",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/batches"
        }
      },
      "facility" : {
        "data" : {
          "id" : "AAAA",
          "type" : "facilities"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/facility",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/facility"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/group"
        }
      },
      "receptionItems" : {
        "data" : [ {
          "type" : "receptionItems",
          "id" : "AAAA"
        }, {
          "type" : "receptionItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/receptions/id/relationships/receptionItems",
          "related" : "https://c-sar.cropster.com/api/v2/receptions/id/receptionItems"
        }
      }
    }
  }
}

Stage Record Measurements

Type name: stageRecordMeasurements

A stage record measurement is one measurement within a stage record and represents a value of a given type at one point of time.

Attributes

Name Type Constraints Notes

created

dateTime

read only

-

date

dateTime

required

-

lastModified

dateTime

read only

-

type

stageMeasurementType

required

Must correspond with a correct value.unit and value.amount.

value

measure

required

Amount and unit must be valid based on the type.

Relationships

Name Constraints Notes

stageRecord

required
init only

-

DELETE Delete a specific stageRecordMeasurement

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/stageRecordMeasurements/<ID>'

Response body

N/A
GET Get multiple specific stageRecordMeasurements

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/stageRecordMeasurements/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "stageRecordMeasurements",
    "attributes" : {
      "created" : 1575281700412,
      "date" : 1575281700412,
      "lastModified" : 1575281700412,
      "type" : "BRIX",
      "value" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "stageRecord" : {
        "data" : {
          "id" : "AAAA",
          "type" : "stageRecords"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/relationships/stageRecord",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/stageRecord"
        }
      }
    }
  } ]
}
GET Get a specific stageRecordMeasurement

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/stageRecordMeasurements/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "stageRecordMeasurements",
    "attributes" : {
      "created" : 1575281700412,
      "date" : 1575281700412,
      "lastModified" : 1575281700412,
      "type" : "BRIX",
      "value" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "stageRecord" : {
        "data" : {
          "id" : "AAAA",
          "type" : "stageRecords"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/relationships/stageRecord",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/stageRecord"
        }
      }
    }
  }
}
GET List all stageRecordMeasurements

Filter Parameters

Name Type Constraints Notes

filter[stageRecordMeasurements][group]

string

required

filter[stageRecordMeasurements][batch]

string

-

filter[stageRecordMeasurements][measurementType]

stageMeasurementType

-

filter[stageRecordMeasurements][stageRecord]

string

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/stageRecordMeasurements?filter[stageRecordMeasurements][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "stageRecordMeasurements",
    "attributes" : {
      "created" : 1575281700412,
      "date" : 1575281700412,
      "lastModified" : 1575281700412,
      "type" : "BRIX",
      "value" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "stageRecord" : {
        "data" : {
          "id" : "AAAA",
          "type" : "stageRecords"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/relationships/stageRecord",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/stageRecord"
        }
      }
    }
  } ]
}
PATCH Update an existing stageRecordMeasurement

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"stageRecordMeasurements","attributes":{"date":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/stageRecordMeasurements/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "stageRecordMeasurements",
    "attributes" : {
      "created" : 1575281700412,
      "date" : <UPDATED_VALUE>,
      "lastModified" : 1575281700412,
      "type" : "BRIX",
      "value" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "stageRecord" : {
        "data" : {
          "id" : "AAAA",
          "type" : "stageRecords"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/relationships/stageRecord",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/stageRecord"
        }
      }
    }
  }
}
POST Create a stageRecordMeasurement

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "stageRecordMeasurements", "attributes" : { "date" : 1575281700412, "type" : "BRIX", "value" : { "amount" : 1, "unit" : "KG", "amountSI" : 1 } }, "relationships" : { "stageRecord" : { "data" : { "id" : "AAAA", "type" : "stageRecords" } } } }}'
     'https://c-sar.cropster.com/api/v2/stageRecordMeasurements'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "stageRecordMeasurements",
    "attributes" : {
      "created" : 1575281700412,
      "date" : 1575281700412,
      "lastModified" : 1575281700412,
      "type" : "BRIX",
      "value" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "stageRecord" : {
        "data" : {
          "id" : "AAAA",
          "type" : "stageRecords"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/relationships/stageRecord",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecordMeasurements/id/stageRecord"
        }
      }
    }
  }
}

Stage Records

Type name: stageRecords

A stage record is a representation of a stage for given batch. When batch is created, stage records are also created based on stages defined for the process that the batch is based on. The attributes name, type and target duration are copied from the stage and the user can fill additional information and add measurements.

A stage record holds a snapshot of a stage that it was based on without an actual relationship because a stage is a mutable object so that relationship would not be meaningful.

Attributes

Name Type Constraints Notes

created

dateTime

read only

-

duration

duration

read only

Actual duration between start date and end date.

endDate

dateTime

-

-

lastModified

dateTime

read only

-

stageName

string

read only

Stage name of the process linked to this batch.

stageTargetDuration

duration

read only

Stage target duration of the process linked to this batch.

stageType

stageType

read only

Stage type of the process linked to this batch.

startDate

dateTime

-

-

Relationships

Name Constraints Notes

batch

read only

-

location

-

Location where the batch stage took place.

measurements

read only

Measurements recorded for the stage record.

GET Get multiple specific stageRecords

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/stageRecords/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "stageRecords",
    "attributes" : {
      "created" : 1575281700412,
      "duration" : 137000,
      "endDate" : null,
      "lastModified" : 1575281700412,
      "stageName" : "stageName",
      "stageTargetDuration" : 137000,
      "stageType" : "RECEPTION",
      "startDate" : null
    },
    "relationships" : {
      "batch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/batch",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/batch"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/location"
        }
      },
      "measurements" : {
        "data" : [ {
          "type" : "stageRecordMeasurements",
          "id" : "AAAA"
        }, {
          "type" : "stageRecordMeasurements",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/measurements",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/measurements"
        }
      }
    }
  } ]
}
GET Get a specific stageRecord

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/stageRecords/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "stageRecords",
    "attributes" : {
      "created" : 1575281700412,
      "duration" : 137000,
      "endDate" : null,
      "lastModified" : 1575281700412,
      "stageName" : "stageName",
      "stageTargetDuration" : 137000,
      "stageType" : "RECEPTION",
      "startDate" : null
    },
    "relationships" : {
      "batch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/batch",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/batch"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/location"
        }
      },
      "measurements" : {
        "data" : [ {
          "type" : "stageRecordMeasurements",
          "id" : "AAAA"
        }, {
          "type" : "stageRecordMeasurements",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/measurements",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/measurements"
        }
      }
    }
  }
}
GET List all stageRecords

Filter Parameters

Name Type Constraints Notes

filter[stageRecords][group]

string

required

filter[stageRecords][batch]

string

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/stageRecords?filter[stageRecords][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "stageRecords",
    "attributes" : {
      "created" : 1575281700412,
      "duration" : 137000,
      "endDate" : null,
      "lastModified" : 1575281700412,
      "stageName" : "stageName",
      "stageTargetDuration" : 137000,
      "stageType" : "RECEPTION",
      "startDate" : null
    },
    "relationships" : {
      "batch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/batch",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/batch"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/location"
        }
      },
      "measurements" : {
        "data" : [ {
          "type" : "stageRecordMeasurements",
          "id" : "AAAA"
        }, {
          "type" : "stageRecordMeasurements",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/measurements",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/measurements"
        }
      }
    }
  } ]
}
PATCH Update an existing stageRecord

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"stageRecords","attributes":{"endDate":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/stageRecords/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "stageRecords",
    "attributes" : {
      "created" : 1575281700412,
      "duration" : 137000,
      "endDate" : <UPDATED_VALUE>,
      "lastModified" : 1575281700412,
      "stageName" : "stageName",
      "stageTargetDuration" : 137000,
      "stageType" : "RECEPTION",
      "startDate" : null
    },
    "relationships" : {
      "batch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/batch",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/batch"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/location"
        }
      },
      "measurements" : {
        "data" : [ {
          "type" : "stageRecordMeasurements",
          "id" : "AAAA"
        }, {
          "type" : "stageRecordMeasurements",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stageRecords/id/relationships/measurements",
          "related" : "https://c-sar.cropster.com/api/v2/stageRecords/id/measurements"
        }
      }
    }
  }
}

Stages

Type name: stages

Stages linked to a process define parts of the process with a type and target duration. When there is a batch created based on a process, a stage record will be created for that batch, representing actual parts of the process with measurements and other information linked to it.

Attributes

Name Type Constraints Notes

name

string

-

Optional user defined name.

created

dateTime

read only

-

lastModified

dateTime

read only

-

sort

integer

-

Defines unique order of stages withing one process. Sort is maintained automatically for all others stages withing one process. Leave null or set to desired order when creating or updating and resorting or adjusting to max value will be handled automatically.

targetDuration

duration

required

-

type

stageType

required

-

Relationships

Name Constraints Notes

process

required
init only

-

DELETE Delete a specific stage

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/stages/<ID>'

Response body

N/A
GET Get multiple specific stages

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/stages/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "stages",
    "attributes" : {
      "name" : null,
      "created" : 1575281700412,
      "lastModified" : 1575281700412,
      "sort" : null,
      "targetDuration" : 137000,
      "type" : "RECEPTION"
    },
    "relationships" : {
      "process" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stages/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/stages/id/process"
        }
      }
    }
  } ]
}
GET Get a specific stage

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/stages/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "stages",
    "attributes" : {
      "name" : null,
      "created" : 1575281700412,
      "lastModified" : 1575281700412,
      "sort" : null,
      "targetDuration" : 137000,
      "type" : "RECEPTION"
    },
    "relationships" : {
      "process" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stages/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/stages/id/process"
        }
      }
    }
  }
}
GET List all stages

Filter Parameters

Name Type Constraints Notes

filter[stages][group]

string

required

filter[stages][process]

string

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/stages?filter[stages][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "stages",
    "attributes" : {
      "name" : null,
      "created" : 1575281700412,
      "lastModified" : 1575281700412,
      "sort" : null,
      "targetDuration" : 137000,
      "type" : "RECEPTION"
    },
    "relationships" : {
      "process" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stages/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/stages/id/process"
        }
      }
    }
  } ]
}
PATCH Update an existing stage

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"stages","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/stages/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "stages",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "created" : 1575281700412,
      "lastModified" : 1575281700412,
      "sort" : null,
      "targetDuration" : 137000,
      "type" : "RECEPTION"
    },
    "relationships" : {
      "process" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stages/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/stages/id/process"
        }
      }
    }
  }
}
POST Create a stage

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "stages", "attributes" : { "targetDuration" : 137000, "type" : "RECEPTION" }, "relationships" : { "process" : { "data" : { "id" : "AAAA", "type" : "processes" } } } }}'
     'https://c-sar.cropster.com/api/v2/stages'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "stages",
    "attributes" : {
      "name" : null,
      "created" : 1575281700412,
      "lastModified" : 1575281700412,
      "sort" : null,
      "targetDuration" : 137000,
      "type" : "RECEPTION"
    },
    "relationships" : {
      "process" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/stages/id/relationships/process",
          "related" : "https://c-sar.cropster.com/api/v2/stages/id/process"
        }
      }
    }
  }
}

Physical

Physical Result Defects

Type name: physicalResultDefects

This object tells you how defective a product is with respect to a certain category being evaluated. These results are serialized within the physical result they belong to. The physical sheet defect defines which kind of defect is being described.

Attributes

Name Type Constraints Notes

calculatedValue

integer

read only

A score is calculated and stored here based on the weight and number of the defects in a result. The initial value is always 0.

count

integer

required

This number must be positive.

weight

measure

-

E.g. {"amount": 1, "unit": "G"}.

Relationships

Name Constraints Notes

physicalResult

required
init only

-

physicalSheetDefect

required
init only

-

DELETE Delete a specific physicalResultDefect

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalResultDefects/<ID>'

Response body

N/A
GET Get multiple specific physicalResultDefects

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalResultDefects/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "physicalResultDefects",
    "attributes" : {
      "calculatedValue" : 1,
      "count" : 1,
      "weight" : {
        "amount" : 1,
        "unit" : "G"
      }
    },
    "relationships" : {
      "physicalResult" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalResults"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/relationships/physicalResult",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/physicalResult"
        }
      },
      "physicalSheetDefect" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheetDefects"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/relationships/physicalSheetDefect",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/physicalSheetDefect"
        }
      }
    }
  } ]
}
GET Get a specific physicalResultDefect

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalResultDefects/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "physicalResultDefects",
    "attributes" : {
      "calculatedValue" : 1,
      "count" : 1,
      "weight" : {
        "amount" : 1,
        "unit" : "G"
      }
    },
    "relationships" : {
      "physicalResult" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalResults"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/relationships/physicalResult",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/physicalResult"
        }
      },
      "physicalSheetDefect" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheetDefects"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/relationships/physicalSheetDefect",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/physicalSheetDefect"
        }
      }
    }
  }
}
PATCH Update an existing physicalResultDefect

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"physicalResultDefects","attributes":{"count":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/physicalResultDefects/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "physicalResultDefects",
    "attributes" : {
      "calculatedValue" : 1,
      "count" : <UPDATED_VALUE>,
      "weight" : {
        "amount" : 1,
        "unit" : "G"
      }
    },
    "relationships" : {
      "physicalResult" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalResults"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/relationships/physicalResult",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/physicalResult"
        }
      },
      "physicalSheetDefect" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheetDefects"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/relationships/physicalSheetDefect",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/physicalSheetDefect"
        }
      }
    }
  }
}
POST Create a physicalResultDefect

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "physicalResultDefects", "attributes" : { "count" : 1, "weight" : { "amount" : 1, "unit" : "G" } }, "relationships" : { "physicalResult" : { "data" : { "id" : "AAAA", "type" : "physicalResults" } }, "physicalSheetDefect" : { "data" : { "id" : "AAAA", "type" : "physicalSheetDefects" } } } }}'
     'https://c-sar.cropster.com/api/v2/physicalResultDefects'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "physicalResultDefects",
    "attributes" : {
      "calculatedValue" : 1,
      "count" : 1,
      "weight" : {
        "amount" : 1,
        "unit" : "G"
      }
    },
    "relationships" : {
      "physicalResult" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalResults"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/relationships/physicalResult",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/physicalResult"
        }
      },
      "physicalSheetDefect" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheetDefects"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/relationships/physicalSheetDefect",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResultDefects/id/physicalSheetDefect"
        }
      }
    }
  }
}

Physical Results

Type name: physicalResults

A physical result reflects the outcome of a physical analysis of a lot. For coffee, such an analysis usually documents the color, smell, moisture, water activity, density, defects, and/or screen size of the analyzed sample. A lot may have multiple physical results if it has been analyzed multiple times. For example, moisture is one attribute that is often measured more than once.

Attributes

Name Type Constraints Notes

idTag

string

read only

-

category

string

-

-

colorOverall

phyColor

-

-

colorUniformity

phyColorUniformity

-

-

density

float

-

E.g. 10.1.

densityVolume

measure

read only

E.g. {"amount": 1, "unit": "ML"}.

densityWeight

measure

read only

E.g. {"amount": 1, "unit": "G"}.

evaluationDate

dateTime

-

-

evaluator

string

-

-

greenWeight

measure

-

-

lab

string

-

-

millingWeightDifference

measure

read only

This is calculated as the greenWeight subtracted from the parchment weight.

moisture

measure

-

This measure uses the unit percent.

parchmentWeight

measure

-

-

quakerCount

integer

-

-

roastedWeight

measure

-

-

screenSizeSummary

string

-

-

screenSizes

screenSizeGrain[]

-

-

smell

phySmell

-

-

temperature

measure

-

-

waterActivity

float

-

This value is between 0 and 1, e.g. 0.1.

Relationships

Name Constraints Notes

group

required

-

lot

required

-

physicalResultDefects

read only

-

physicalSheet

required

-

DELETE Delete a specific physicalResult

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalResults/<ID>'

Response body

N/A
GET Get multiple specific physicalResults

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalResults/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "physicalResults",
    "attributes" : {
      "idTag" : "idTag",
      "category" : null,
      "colorOverall" : null,
      "colorUniformity" : null,
      "density" : 10.1,
      "densityVolume" : {
        "amount" : 1,
        "unit" : "ML"
      },
      "densityWeight" : {
        "amount" : 1,
        "unit" : "G"
      },
      "evaluationDate" : null,
      "evaluator" : null,
      "greenWeight" : null,
      "lab" : null,
      "millingWeightDifference" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "moisture" : null,
      "parchmentWeight" : null,
      "quakerCount" : null,
      "roastedWeight" : null,
      "screenSizeSummary" : null,
      "screenSizes" : [ ],
      "smell" : null,
      "temperature" : null,
      "waterActivity" : 0.1
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/lot"
        }
      },
      "physicalResultDefects" : {
        "data" : [ {
          "type" : "physicalResultDefects",
          "id" : "AAAA"
        }, {
          "type" : "physicalResultDefects",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalResultDefects",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalResultDefects"
        }
      },
      "physicalSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalSheet",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalSheet"
        }
      }
    }
  } ]
}
GET Get a specific physicalResult

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalResults/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "physicalResults",
    "attributes" : {
      "idTag" : "idTag",
      "category" : null,
      "colorOverall" : null,
      "colorUniformity" : null,
      "density" : 10.1,
      "densityVolume" : {
        "amount" : 1,
        "unit" : "ML"
      },
      "densityWeight" : {
        "amount" : 1,
        "unit" : "G"
      },
      "evaluationDate" : null,
      "evaluator" : null,
      "greenWeight" : null,
      "lab" : null,
      "millingWeightDifference" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "moisture" : null,
      "parchmentWeight" : null,
      "quakerCount" : null,
      "roastedWeight" : null,
      "screenSizeSummary" : null,
      "screenSizes" : [ ],
      "smell" : null,
      "temperature" : null,
      "waterActivity" : 0.1
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/lot"
        }
      },
      "physicalResultDefects" : {
        "data" : [ {
          "type" : "physicalResultDefects",
          "id" : "AAAA"
        }, {
          "type" : "physicalResultDefects",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalResultDefects",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalResultDefects"
        }
      },
      "physicalSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalSheet",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalSheet"
        }
      }
    }
  }
}
GET List all physicalResults

Filter Parameters

Name Type Constraints Notes

filter[physicalResults][group]

string

-

-

filter[physicalResults][lot.searchTerm]

string

-

-

filter[physicalResults][lot.name]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][lot.idTag]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][lot.trackingNumber]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][lot.salesNumber]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][lot.purchaseOrderNumber]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][lot.sampleType]

sampleType

-

Repeatable, objects must match at least one.

filter[physicalResults][lot.project]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][idTag]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][lab]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][evaluator]

string

-

Repeatable, objects must match at least one.

filter[physicalResults][evaluationDate.from]

dateTime

-

-

filter[physicalResults][evaluationDate.to]

dateTime

-

-

filter[physicalResults][colorOverall]

phyColor

-

Repeatable, objects must match at least one.

filter[physicalResults][colorUniformity]

phyColorUniformity

-

Repeatable, objects must match at least one.

filter[physicalResults][smell]

phySmell

-

Repeatable, objects must match at least one.

filter[physicalResults][category]

string

-

Repeatable, objects must match at least one.

Sort Parameters

Name Value

sort[physicalResults][id]

asc/desc

sort[physicalResults][idTag]

asc/desc

sort[physicalResults][lab]

asc/desc

sort[physicalResults][evaluator]

asc/desc

sort[physicalResults][evaluationDate]

asc/desc

sort[physicalResults][smell]

asc/desc

sort[physicalResults][color]

asc/desc

sort[physicalResults][colorUniformity]

asc/desc

sort[physicalResults][moisture]

asc/desc

sort[physicalResults][density]

asc/desc

sort[physicalResults][densityCapacity]

asc/desc

sort[physicalResults][densityWeight]

asc/desc

sort[physicalResults][waterActivity]

asc/desc

sort[physicalResults][temperature]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/physicalResults?filter[physicalResults][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "physicalResults",
    "attributes" : {
      "idTag" : "idTag",
      "category" : null,
      "colorOverall" : null,
      "colorUniformity" : null,
      "density" : 10.1,
      "densityVolume" : {
        "amount" : 1,
        "unit" : "ML"
      },
      "densityWeight" : {
        "amount" : 1,
        "unit" : "G"
      },
      "evaluationDate" : null,
      "evaluator" : null,
      "greenWeight" : null,
      "lab" : null,
      "millingWeightDifference" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "moisture" : null,
      "parchmentWeight" : null,
      "quakerCount" : null,
      "roastedWeight" : null,
      "screenSizeSummary" : null,
      "screenSizes" : [ ],
      "smell" : null,
      "temperature" : null,
      "waterActivity" : 0.1
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/lot"
        }
      },
      "physicalResultDefects" : {
        "data" : [ {
          "type" : "physicalResultDefects",
          "id" : "AAAA"
        }, {
          "type" : "physicalResultDefects",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalResultDefects",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalResultDefects"
        }
      },
      "physicalSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalSheet",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalSheet"
        }
      }
    }
  } ]
}
PATCH Update an existing physicalResult

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"physicalResults","attributes":{"category":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/physicalResults/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "physicalResults",
    "attributes" : {
      "idTag" : "idTag",
      "category" : <UPDATED_VALUE>,
      "colorOverall" : null,
      "colorUniformity" : null,
      "density" : 10.1,
      "densityVolume" : {
        "amount" : 1,
        "unit" : "ML"
      },
      "densityWeight" : {
        "amount" : 1,
        "unit" : "G"
      },
      "evaluationDate" : null,
      "evaluator" : null,
      "greenWeight" : null,
      "lab" : null,
      "millingWeightDifference" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "moisture" : null,
      "parchmentWeight" : null,
      "quakerCount" : null,
      "roastedWeight" : null,
      "screenSizeSummary" : null,
      "screenSizes" : [ ],
      "smell" : null,
      "temperature" : null,
      "waterActivity" : 0.1
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/lot"
        }
      },
      "physicalResultDefects" : {
        "data" : [ {
          "type" : "physicalResultDefects",
          "id" : "AAAA"
        }, {
          "type" : "physicalResultDefects",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalResultDefects",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalResultDefects"
        }
      },
      "physicalSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalSheet",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalSheet"
        }
      }
    }
  }
}
POST Create a physicalResult

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "physicalResults", "attributes" : { "density" : 10.1, "waterActivity" : 0.1 }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } }, "lot" : { "data" : { "id" : "AAAA", "type" : "lots" } }, "physicalSheet" : { "data" : { "id" : "AAAA", "type" : "physicalSheets" } } } }}'
     'https://c-sar.cropster.com/api/v2/physicalResults'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "physicalResults",
    "attributes" : {
      "idTag" : "idTag",
      "category" : null,
      "colorOverall" : null,
      "colorUniformity" : null,
      "density" : 10.1,
      "densityVolume" : {
        "amount" : 1,
        "unit" : "ML"
      },
      "densityWeight" : {
        "amount" : 1,
        "unit" : "G"
      },
      "evaluationDate" : null,
      "evaluator" : null,
      "greenWeight" : null,
      "lab" : null,
      "millingWeightDifference" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "moisture" : null,
      "parchmentWeight" : null,
      "quakerCount" : null,
      "roastedWeight" : null,
      "screenSizeSummary" : null,
      "screenSizes" : [ ],
      "smell" : null,
      "temperature" : null,
      "waterActivity" : 0.1
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/lot"
        }
      },
      "physicalResultDefects" : {
        "data" : [ {
          "type" : "physicalResultDefects",
          "id" : "AAAA"
        }, {
          "type" : "physicalResultDefects",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalResultDefects",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalResultDefects"
        }
      },
      "physicalSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalResults/id/relationships/physicalSheet",
          "related" : "https://c-sar.cropster.com/api/v2/physicalResults/id/physicalSheet"
        }
      }
    }
  }
}

Physical Sheet Defects

Type name: physicalSheetDefects

This object defines a physical defect that could be found on a product. An example for such a defect would be a full black coffee bean (before roasting, that is). Different physical sheets may define different kinds of defects. A definition of a defect always belongs to a physical sheet.

Attributes

Name Type Constraints Notes

name

string

read only

-

formula

string

read only

-

measurementType

measurementType

read only

Indicates whether the defect was evaluated as weight or as number of beans.

position

integer

read only

-

sheetGroup

integer

read only

-

Relationships

Name Constraints Notes

physicalSheet

read only

-

GET Get multiple specific physicalSheetDefects

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalSheetDefects/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "physicalSheetDefects",
    "attributes" : {
      "name" : "name",
      "formula" : "formula",
      "measurementType" : "WEIGHT",
      "position" : 1,
      "sheetGroup" : 1
    },
    "relationships" : {
      "physicalSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalSheetDefects/id/relationships/physicalSheet",
          "related" : "https://c-sar.cropster.com/api/v2/physicalSheetDefects/id/physicalSheet"
        }
      }
    }
  } ]
}
GET Get a specific physicalSheetDefect

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalSheetDefects/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "physicalSheetDefects",
    "attributes" : {
      "name" : "name",
      "formula" : "formula",
      "measurementType" : "WEIGHT",
      "position" : 1,
      "sheetGroup" : 1
    },
    "relationships" : {
      "physicalSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "physicalSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalSheetDefects/id/relationships/physicalSheet",
          "related" : "https://c-sar.cropster.com/api/v2/physicalSheetDefects/id/physicalSheet"
        }
      }
    }
  }
}

Physical Sheets

Type name: physicalSheets

This is essentially the digital counterpart to paper sheets that are used to evaluate the physical state of a product. Physical sheets are especially important for recording defects that should be tracked.

Attributes

Name Type Constraints Notes

name

string

read only

-

isDensityCalculated

boolean

read only

-

isGlobal

boolean

read only

-

isParchmentCoffee

boolean

read only

-

languages

string[]

read only

-

screenSizeMode

int

read only

-

Relationships

Name Constraints Notes

physicalSheetDefects

read only

-

GET Get multiple specific physicalSheets

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalSheets/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "physicalSheets",
    "attributes" : {
      "name" : "name",
      "isDensityCalculated" : true,
      "isGlobal" : true,
      "isParchmentCoffee" : true,
      "languages" : [ "languages" ],
      "screenSizeMode" : 1
    },
    "relationships" : {
      "physicalSheetDefects" : {
        "data" : [ {
          "type" : "physicalSheetDefects",
          "id" : "AAAA"
        }, {
          "type" : "physicalSheetDefects",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalSheets/id/relationships/physicalSheetDefects",
          "related" : "https://c-sar.cropster.com/api/v2/physicalSheets/id/physicalSheetDefects"
        }
      }
    }
  } ]
}
GET Get a specific physicalSheet

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/physicalSheets/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "physicalSheets",
    "attributes" : {
      "name" : "name",
      "isDensityCalculated" : true,
      "isGlobal" : true,
      "isParchmentCoffee" : true,
      "languages" : [ "languages" ],
      "screenSizeMode" : 1
    },
    "relationships" : {
      "physicalSheetDefects" : {
        "data" : [ {
          "type" : "physicalSheetDefects",
          "id" : "AAAA"
        }, {
          "type" : "physicalSheetDefects",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalSheets/id/relationships/physicalSheetDefects",
          "related" : "https://c-sar.cropster.com/api/v2/physicalSheets/id/physicalSheetDefects"
        }
      }
    }
  }
}
GET List all physicalSheets

Filter Parameters

Name Type Constraints Notes

filter[physicalSheets][group]

string

required

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/physicalSheets?filter[physicalSheets][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "physicalSheets",
    "attributes" : {
      "name" : "name",
      "isDensityCalculated" : true,
      "isGlobal" : true,
      "isParchmentCoffee" : true,
      "languages" : [ "languages" ],
      "screenSizeMode" : 1
    },
    "relationships" : {
      "physicalSheetDefects" : {
        "data" : [ {
          "type" : "physicalSheetDefects",
          "id" : "AAAA"
        }, {
          "type" : "physicalSheetDefects",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/physicalSheets/id/relationships/physicalSheetDefects",
          "related" : "https://c-sar.cropster.com/api/v2/physicalSheets/id/physicalSheetDefects"
        }
      }
    }
  } ]
}

Processing

Blend Profile Components

Type name: blendProfileComponents

Attributes

Name Type Constraints Notes

percentage

bigDecimal

-

-

Relationships

Name Constraints Notes

blendProfile

-

-

profile

-

-

DELETE Delete a specific blendProfileComponent

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/blendProfileComponents/<ID>'

Response body

N/A
GET Get multiple specific blendProfileComponents

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/blendProfileComponents/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "blendProfileComponents",
    "attributes" : {
      "percentage" : null
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/blendProfile"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/profile"
        }
      }
    }
  } ]
}
GET Get a specific blendProfileComponent

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/blendProfileComponents/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "blendProfileComponents",
    "attributes" : {
      "percentage" : null
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/blendProfile"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/profile"
        }
      }
    }
  }
}
PATCH Update an existing blendProfileComponent

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"blendProfileComponents","attributes":{"percentage":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/blendProfileComponents/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "blendProfileComponents",
    "attributes" : {
      "percentage" : <UPDATED_VALUE>
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/blendProfile"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/profile"
        }
      }
    }
  }
}
POST Create a blendProfileComponent

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "blendProfileComponents", "attributes" : { "percentage" : 1.0 }, "relationships" : { } }}'
     'https://c-sar.cropster.com/api/v2/blendProfileComponents'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "blendProfileComponents",
    "attributes" : {
      "percentage" : 1.0
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/blendProfile"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfileComponents/id/profile"
        }
      }
    }
  }
}

Blend Profiles

Type name: blendProfiles

Attributes

Name Type Constraints Notes

name

string

-

-

createdDate

dateTime

read only

-

isActive

boolean

-

-

lastModifiedDate

dateTime

read only

-

Relationships

Name Constraints Notes

blendProfileComponents

-

-

group

-

-

DELETE Delete a specific blendProfile

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/blendProfiles/<ID>'

Response body

N/A
GET Get multiple specific blendProfiles

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/blendProfiles/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "blendProfiles",
    "attributes" : {
      "name" : null,
      "createdDate" : 1575281700412,
      "isActive" : null,
      "lastModifiedDate" : 1575281700412
    },
    "relationships" : {
      "blendProfileComponents" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/blendProfileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/blendProfileComponents"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/group"
        }
      }
    }
  } ]
}
GET Get a specific blendProfile

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/blendProfiles/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "blendProfiles",
    "attributes" : {
      "name" : null,
      "createdDate" : 1575281700412,
      "isActive" : null,
      "lastModifiedDate" : 1575281700412
    },
    "relationships" : {
      "blendProfileComponents" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/blendProfileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/blendProfileComponents"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/group"
        }
      }
    }
  }
}
GET List all blendProfiles

Filter Parameters

Name Type Constraints Notes

filter[blendProfiles][group]

string

required

filter[blendProfiles][hasGreenLot]

boolean

-

filter[blendProfiles][name]

string

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/blendProfiles?filter[blendProfiles][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "blendProfiles",
    "attributes" : {
      "name" : null,
      "createdDate" : 1575281700412,
      "isActive" : null,
      "lastModifiedDate" : 1575281700412
    },
    "relationships" : {
      "blendProfileComponents" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/blendProfileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/blendProfileComponents"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/group"
        }
      }
    }
  } ]
}
PATCH Update an existing blendProfile

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"blendProfiles","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/blendProfiles/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "blendProfiles",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "createdDate" : 1575281700412,
      "isActive" : null,
      "lastModifiedDate" : 1575281700412
    },
    "relationships" : {
      "blendProfileComponents" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/blendProfileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/blendProfileComponents"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/group"
        }
      }
    }
  }
}
POST Create a blendProfile

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "blendProfiles", "attributes" : { "name" : "name" }, "relationships" : { } }}'
     'https://c-sar.cropster.com/api/v2/blendProfiles'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "blendProfiles",
    "attributes" : {
      "name" : "name",
      "createdDate" : 1575281700412,
      "isActive" : null,
      "lastModifiedDate" : 1575281700412
    },
    "relationships" : {
      "blendProfileComponents" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/blendProfileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/blendProfileComponents"
        }
      },
      "group" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/blendProfiles/id/group"
        }
      }
    }
  }
}

Machines

Type name: machines

Attributes

Name Type Constraints Notes

name

string

read only

Generated from the machineType and identifier.

capacity

measure

-

-

created

dateTime

read only

-

erpId

string

-

This is the ID that this object has in another software (usually some ERP) system.

forSamples

boolean

-

-

identifier

string

-

Custom identifier to tell machines of the same type apart.

lastModified

dateTime

read only

-

lastUsedDate

dateTime

read only

-

supportedMeasures

string[]

-

-

type

machineType

read only

-

Relationships

Name Constraints Notes

createdBy

read only

-

group

read only

-

lastModifiedBy

read only

-

location

-

-

GET Get multiple specific machines

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/machines/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "machines",
    "attributes" : {
      "name" : "name",
      "capacity" : null,
      "created" : 1575281700412,
      "erpId" : null,
      "forSamples" : null,
      "identifier" : null,
      "lastModified" : 1575281700412,
      "lastUsedDate" : 1575281700412,
      "supportedMeasures" : [ ],
      "type" : "P100Mex_GENERIC"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/lastModifiedBy"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/location"
        }
      }
    }
  } ]
}
GET Get a specific machine

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/machines/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "machines",
    "attributes" : {
      "name" : "name",
      "capacity" : null,
      "created" : 1575281700412,
      "erpId" : null,
      "forSamples" : null,
      "identifier" : null,
      "lastModified" : 1575281700412,
      "lastUsedDate" : 1575281700412,
      "supportedMeasures" : [ ],
      "type" : "P100Mex_GENERIC"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/lastModifiedBy"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/location"
        }
      }
    }
  }
}
GET List all machines

Filter Parameters

If the group code is omitted, machines are filtered based on the current user and all other filter parameters are ignored.

Name Type Constraints Notes

filter[machines][group]

string

-

-

filter[machines][erpId]

string

-

-

filter[machines][machineType]

machineType

-

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/machines?filter[machines][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "machines",
    "attributes" : {
      "name" : "name",
      "capacity" : null,
      "created" : 1575281700412,
      "erpId" : null,
      "forSamples" : null,
      "identifier" : null,
      "lastModified" : 1575281700412,
      "lastUsedDate" : 1575281700412,
      "supportedMeasures" : [ ],
      "type" : "P100Mex_GENERIC"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/lastModifiedBy"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/location"
        }
      }
    }
  } ]
}
PATCH Update an existing machine

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"machines","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/machines/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "machines",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "capacity" : null,
      "created" : 1575281700412,
      "erpId" : null,
      "forSamples" : null,
      "identifier" : null,
      "lastModified" : 1575281700412,
      "lastUsedDate" : 1575281700412,
      "supportedMeasures" : [ ],
      "type" : "P100Mex_GENERIC"
    },
    "relationships" : {
      "createdBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/createdBy",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/createdBy"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/group"
        }
      },
      "lastModifiedBy" : {
        "data" : {
          "id" : "AAAA",
          "type" : "users"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/lastModifiedBy",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/lastModifiedBy"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/machines/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/machines/id/location"
        }
      }
    }
  }
}

Processing Comments

Type name: processingComments

Attributes

Name Type Constraints Notes

createdDate

dateTime

read only

-

event

string

-

-

note

string

-

-

time

duration

required

-

Relationships

Name Constraints Notes

processing

required

-

DELETE Delete a specific processingComment

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingComments/<ID>'

Response body

N/A
GET Get multiple specific processingComments

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingComments/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "processingComments",
    "attributes" : {
      "createdDate" : 1575281700412,
      "event" : null,
      "note" : null,
      "time" : 137000
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingComments/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingComments/id/processing"
        }
      }
    }
  } ]
}
GET Get a specific processingComment

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingComments/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processingComments",
    "attributes" : {
      "createdDate" : 1575281700412,
      "event" : null,
      "note" : null,
      "time" : 137000
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingComments/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingComments/id/processing"
        }
      }
    }
  }
}
PATCH Update an existing processingComment

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"processingComments","attributes":{"event":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/processingComments/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "processingComments",
    "attributes" : {
      "createdDate" : 1575281700412,
      "event" : <UPDATED_VALUE>,
      "note" : null,
      "time" : 137000
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingComments/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingComments/id/processing"
        }
      }
    }
  }
}
POST Create a processingComment

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "processingComments", "attributes" : { "time" : 137000 }, "relationships" : { "processing" : { "data" : { "id" : "AAAA", "type" : "processings" } } } }}'
     'https://c-sar.cropster.com/api/v2/processingComments'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processingComments",
    "attributes" : {
      "createdDate" : 1575281700412,
      "event" : null,
      "note" : null,
      "time" : 137000
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingComments/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingComments/id/processing"
        }
      }
    }
  }
}

Processing Curves

Type name: processingCurves

Attributes

Name Type Constraints Notes

name

string

required

-

duration

duration

read only

-

isArtificial

boolean

read only

Identifies curves that do not exist as a resource and are automatically generated.

unit

unit

required

-

values

timeValue[]

required

-

Relationships

Name Constraints Notes

processing

required

-

DELETE Delete a specific processingCurve

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingCurves/<ID>'

Response body

N/A
GET Get multiple specific processingCurves

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingCurves/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "processingCurves",
    "attributes" : {
      "name" : "name",
      "duration" : 137000,
      "isArtificial" : true,
      "unit" : "CELSIUS",
      "values" : [ {
        "duration" : 100,
        "value" : 1
      } ]
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingCurves/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingCurves/id/processing"
        }
      }
    }
  } ]
}
GET Get a specific processingCurve

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingCurves/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processingCurves",
    "attributes" : {
      "name" : "name",
      "duration" : 137000,
      "isArtificial" : true,
      "unit" : "CELSIUS",
      "values" : [ {
        "duration" : 100,
        "value" : 1
      } ]
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingCurves/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingCurves/id/processing"
        }
      }
    }
  }
}
GET List all processingCurves

Filter Parameters

Name Type Constraints Notes

filter[processingCurves][group]

string

required

filter[processingCurves][processing]

string

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/processingCurves?filter[processingCurves][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "processingCurves",
    "attributes" : {
      "name" : "name",
      "duration" : 137000,
      "isArtificial" : true,
      "unit" : "CELSIUS",
      "values" : [ {
        "duration" : 100,
        "value" : 1
      } ]
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingCurves/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingCurves/id/processing"
        }
      }
    }
  } ]
}
PATCH Update an existing processingCurve

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"processingCurves","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/processingCurves/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "processingCurves",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "duration" : 137000,
      "isArtificial" : true,
      "unit" : "CELSIUS",
      "values" : [ {
        "duration" : 100,
        "value" : 1
      } ]
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingCurves/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingCurves/id/processing"
        }
      }
    }
  }
}
POST Create a processingCurve

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "processingCurves", "attributes" : { "name" : "name", "unit" : "CELSIUS", "values" : [ { "duration" : 100, "value" : 1 } ] }, "relationships" : { "processing" : { "data" : { "id" : "AAAA", "type" : "processings" } } } }}'
     'https://c-sar.cropster.com/api/v2/processingCurves'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processingCurves",
    "attributes" : {
      "name" : "name",
      "duration" : 137000,
      "isArtificial" : true,
      "unit" : "CELSIUS",
      "values" : [ {
        "duration" : 100,
        "value" : 1
      } ]
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingCurves/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingCurves/id/processing"
        }
      }
    }
  }
}

Processing Measures

Type name: processingMeasures

Attributes

Name Type Constraints Notes

name

string

required

-

measure

measure

required

-

Relationships

Name Constraints Notes

processing

required

-


DELETE Delete a specific processingMeasure

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingMeasures/<ID>'

Response body

N/A
GET Get multiple specific processingMeasures

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingMeasures/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "processingMeasures",
    "attributes" : {
      "name" : "name",
      "measure" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingMeasures/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingMeasures/id/processing"
        }
      }
    }
  } ]
}
GET Get a specific processingMeasure

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processingMeasures/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processingMeasures",
    "attributes" : {
      "name" : "name",
      "measure" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingMeasures/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingMeasures/id/processing"
        }
      }
    }
  }
}
PATCH Update an existing processingMeasure

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"processingMeasures","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/processingMeasures/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "processingMeasures",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "measure" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingMeasures/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingMeasures/id/processing"
        }
      }
    }
  }
}
POST Create a processingMeasure

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "processingMeasures", "attributes" : { "name" : "name", "measure" : { "amount" : 1, "unit" : "KG", "amountSI" : 1 } }, "relationships" : { "processing" : { "data" : { "id" : "AAAA", "type" : "processings" } } } }}'
     'https://c-sar.cropster.com/api/v2/processingMeasures'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processingMeasures",
    "attributes" : {
      "name" : "name",
      "measure" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processingMeasures/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/processingMeasures/id/processing"
        }
      }
    }
  }
}

Processing

Type name: processings

Attributes

Name Type Constraints Notes

duration

duration

-

-

endDate

dateTime

read only

-

endWeight

measure

read only

-

notes

string

-

-

startDate

dateTime

-

Set by the server if no value is provided by the client.

startWeight

measure

read only

-

worker

string

-

-

Relationships

Name Constraints Notes

lot

read only

-

machine

-

-

processingComments

read only

-

processingCurves

read only

-

processingMeasures

read only

-

profile

-

-

GET Get multiple specific processings

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processings/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "processings",
    "attributes" : {
      "duration" : null,
      "endDate" : 1575281700412,
      "endWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "notes" : null,
      "startDate" : null,
      "startWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "worker" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/lot"
        }
      },
      "machine" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/machine",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/machine"
        }
      },
      "processingComments" : {
        "data" : [ {
          "type" : "processingComments",
          "id" : "AAAA"
        }, {
          "type" : "processingComments",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingComments",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingComments"
        }
      },
      "processingCurves" : {
        "data" : [ {
          "type" : "processingCurves",
          "id" : "AAAA"
        }, {
          "type" : "processingCurves",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingCurves",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingCurves"
        }
      },
      "processingMeasures" : {
        "data" : [ {
          "type" : "processingMeasures",
          "id" : "AAAA"
        }, {
          "type" : "processingMeasures",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingMeasures",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingMeasures"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/profile"
        }
      }
    }
  } ]
}
GET Get a specific processing

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/processings/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "processings",
    "attributes" : {
      "duration" : null,
      "endDate" : 1575281700412,
      "endWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "notes" : null,
      "startDate" : null,
      "startWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "worker" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/lot"
        }
      },
      "machine" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/machine",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/machine"
        }
      },
      "processingComments" : {
        "data" : [ {
          "type" : "processingComments",
          "id" : "AAAA"
        }, {
          "type" : "processingComments",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingComments",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingComments"
        }
      },
      "processingCurves" : {
        "data" : [ {
          "type" : "processingCurves",
          "id" : "AAAA"
        }, {
          "type" : "processingCurves",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingCurves",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingCurves"
        }
      },
      "processingMeasures" : {
        "data" : [ {
          "type" : "processingMeasures",
          "id" : "AAAA"
        }, {
          "type" : "processingMeasures",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingMeasures",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingMeasures"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/profile"
        }
      }
    }
  }
}
GET List all processings

Filter Parameters

Name Type Constraints Notes

filter[processings][group]

string

required

filter[processings][processingProfile.id]

string

-

filter[processings][processingProfile.name]

string

-

Sort Parameters

Name Value

sort[processings][endDate]

asc/desc

sort[processings][id]

asc/desc

sort[processings][worker]

asc/desc

sort[processings][startDate]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/processings?filter[processings][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "processings",
    "attributes" : {
      "duration" : null,
      "endDate" : 1575281700412,
      "endWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "notes" : null,
      "startDate" : null,
      "startWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "worker" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/lot"
        }
      },
      "machine" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/machine",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/machine"
        }
      },
      "processingComments" : {
        "data" : [ {
          "type" : "processingComments",
          "id" : "AAAA"
        }, {
          "type" : "processingComments",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingComments",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingComments"
        }
      },
      "processingCurves" : {
        "data" : [ {
          "type" : "processingCurves",
          "id" : "AAAA"
        }, {
          "type" : "processingCurves",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingCurves",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingCurves"
        }
      },
      "processingMeasures" : {
        "data" : [ {
          "type" : "processingMeasures",
          "id" : "AAAA"
        }, {
          "type" : "processingMeasures",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingMeasures",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingMeasures"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/profile"
        }
      }
    }
  } ]
}
PATCH Update an existing processing

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"processings","attributes":{"duration":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/processings/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "processings",
    "attributes" : {
      "duration" : <UPDATED_VALUE>,
      "endDate" : 1575281700412,
      "endWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "notes" : null,
      "startDate" : null,
      "startWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "worker" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/lot"
        }
      },
      "machine" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/machine",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/machine"
        }
      },
      "processingComments" : {
        "data" : [ {
          "type" : "processingComments",
          "id" : "AAAA"
        }, {
          "type" : "processingComments",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingComments",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingComments"
        }
      },
      "processingCurves" : {
        "data" : [ {
          "type" : "processingCurves",
          "id" : "AAAA"
        }, {
          "type" : "processingCurves",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingCurves",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingCurves"
        }
      },
      "processingMeasures" : {
        "data" : [ {
          "type" : "processingMeasures",
          "id" : "AAAA"
        }, {
          "type" : "processingMeasures",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/processingMeasures",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/processingMeasures"
        }
      },
      "profile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/processings/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/processings/id/profile"
        }
      }
    }
  }
}

Profile Components

Type name: profileComponents

Attributes

Name Type Constraints Notes

name

string

-

-

percentage

bigDecimal

-

This value must be between 0 and 1.

Relationships

Name Constraints Notes

lots

-

-

profile

required

-

DELETE Delete a specific profileComponent

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profileComponents/<ID>'

Response body

N/A
GET Get multiple specific profileComponents

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profileComponents/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "profileComponents",
    "attributes" : {
      "name" : null,
      "percentage" : null
    },
    "relationships" : {
      "lots" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/lots",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/lots"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/profile"
        }
      }
    }
  } ]
}
GET Get a specific profileComponent

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profileComponents/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "profileComponents",
    "attributes" : {
      "name" : null,
      "percentage" : null
    },
    "relationships" : {
      "lots" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/lots",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/lots"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/profile"
        }
      }
    }
  }
}
GET List all profileComponents

Filter Parameters

Name Type Constraints Notes

filter[profileComponents][profile.group]

string

required

filter[profileComponents][profile.name]

string

-

filter[profileComponents][lots]

string

-

filter[profileComponents][profile.archived]

boolean

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/profileComponents?filter[profileComponents][profile.group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "profileComponents",
    "attributes" : {
      "name" : null,
      "percentage" : null
    },
    "relationships" : {
      "lots" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/lots",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/lots"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/profile"
        }
      }
    }
  } ]
}
PATCH Update an existing profileComponent

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"profileComponents","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/profileComponents/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "profileComponents",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "percentage" : null
    },
    "relationships" : {
      "lots" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/lots",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/lots"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/profile"
        }
      }
    }
  }
}
POST Create a profileComponent

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "profileComponents", "attributes" : { }, "relationships" : { "profile" : { "data" : { "id" : "AAAA", "type" : "profiles" } } } }}'
     'https://c-sar.cropster.com/api/v2/profileComponents'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "profileComponents",
    "attributes" : {
      "name" : null,
      "percentage" : null
    },
    "relationships" : {
      "lots" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/lots",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/lots"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileComponents/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileComponents/id/profile"
        }
      }
    }
  }
}

Profile Lot References

Type name: profileLotReferences

Attributes

Name Type Constraints Notes

createdDate

dateTime

-

-

Relationships

Name Constraints Notes

lot

required
init only

-

profile

required
init only

-

DELETE Delete a specific profileLotReference

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profileLotReferences/<ID>'

Response body

N/A
GET Get multiple specific profileLotReferences

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profileLotReferences/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "profileLotReferences",
    "attributes" : {
      "createdDate" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/lot"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/profile"
        }
      }
    }
  } ]
}
GET Get a specific profileLotReference

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profileLotReferences/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "profileLotReferences",
    "attributes" : {
      "createdDate" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/lot"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/profile"
        }
      }
    }
  }
}
GET List all profileLotReferences

Filter Parameters

Name Type Constraints Notes

filter[profileLotReferences][group]

string

required

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/profileLotReferences?filter[profileLotReferences][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "profileLotReferences",
    "attributes" : {
      "createdDate" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/lot"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/profile"
        }
      }
    }
  } ]
}
POST Create a profileLotReference

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "profileLotReferences", "attributes" : { }, "relationships" : { "lot" : { "data" : { "id" : "AAAA", "type" : "lots" } }, "profile" : { "data" : { "id" : "AAAA", "type" : "profiles" } } } }}'
     'https://c-sar.cropster.com/api/v2/profileLotReferences'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "profileLotReferences",
    "attributes" : {
      "createdDate" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/lot"
        }
      },
      "profile" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profiles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/relationships/profile",
          "related" : "https://c-sar.cropster.com/api/v2/profileLotReferences/id/profile"
        }
      }
    }
  }
}

Profiles

Type name: profiles

Attributes

Name Type Constraints Notes

name

string

required

-

batchSize

measure

-

-

calculatedWeightChange

bigDecimal

read only

-

createdDate

dateTime

read only

-

erpId

string

-

This is a user defined id.

isActive

boolean

read only

To set to false, use the DELETE request.

isArchived

boolean

-

-

lastModifiedDate

dateTime

read only

-

newLotName

string

-

-

notes

string

-

-

profileLotReferencesLastModifiedDate

dateTime

read only

-

weightChange

bigDecimal

-

-

Relationships

Name Constraints Notes

group

required

-

profileComponents

read only

-

profileLotReference

read only

This references the current ProfileLotReference.

profileLotReferences

read only

This references the current and historical ProfileLotReference.

project

-

-

referenceLot

read only

This references the current ReferenceLot.

referenceLots

read only

This references the current and historical ReferenceLots.

restrictedMachines

-

-

DELETE Delete a specific profile

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profiles/<ID>'

Response body

N/A
GET Get multiple specific profiles

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profiles/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "profiles",
    "attributes" : {
      "name" : "name",
      "batchSize" : null,
      "calculatedWeightChange" : 1.0,
      "createdDate" : 1575281700412,
      "erpId" : null,
      "isActive" : true,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "newLotName" : null,
      "notes" : null,
      "profileLotReferencesLastModifiedDate" : 1575281700412,
      "weightChange" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/group"
        }
      },
      "profileComponents" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileComponents"
        }
      },
      "profileLotReference" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profileLotReferences"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReference",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReference"
        }
      },
      "profileLotReferences" : {
        "data" : [ {
          "type" : "profileLotReferences",
          "id" : "AAAA"
        }, {
          "type" : "profileLotReferences",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReferences",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReferences"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/project"
        }
      },
      "referenceLot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLot",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLot"
        }
      },
      "referenceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLots",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLots"
        }
      },
      "restrictedMachines" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/restrictedMachines",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/restrictedMachines"
        }
      }
    }
  } ]
}
GET Get a specific profile

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/profiles/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "profiles",
    "attributes" : {
      "name" : "name",
      "batchSize" : null,
      "calculatedWeightChange" : 1.0,
      "createdDate" : 1575281700412,
      "erpId" : null,
      "isActive" : true,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "newLotName" : null,
      "notes" : null,
      "profileLotReferencesLastModifiedDate" : 1575281700412,
      "weightChange" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/group"
        }
      },
      "profileComponents" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileComponents"
        }
      },
      "profileLotReference" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profileLotReferences"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReference",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReference"
        }
      },
      "profileLotReferences" : {
        "data" : [ {
          "type" : "profileLotReferences",
          "id" : "AAAA"
        }, {
          "type" : "profileLotReferences",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReferences",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReferences"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/project"
        }
      },
      "referenceLot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLot",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLot"
        }
      },
      "referenceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLots",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLots"
        }
      },
      "restrictedMachines" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/restrictedMachines",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/restrictedMachines"
        }
      }
    }
  }
}
GET List all profiles

Filter Parameters

Name Type Constraints Notes

filter[profiles][group]

string

required

filter[profiles][id]

string

-

filter[profiles][name]

string

-

filter[profiles][erpId]

string

-

filter[profiles][type]

profileType

-

filter[profiles][isArchived]

boolean

-

filter[profiles][includeArchived]

boolean

-

filter[profiles][isActive]

boolean

-

filter[profiles][includeInactive]

boolean

-

filter[profiles][lastModifiedDate.from]

dateTime

-

filter[profiles][lastModifiedDate.to]

dateTime

-

filter[profiles][prototypesLastModifiedDate.from]

dateTime

-

filter[profiles][prototypesLastModifiedDate.to]

dateTime

-

filter[profiles][project]

string

-

filter[profiles][roastedComponent]

string

-

filter[profiles][components.lots]

string

-

filter[profiles][components.id]

string

-

filter[profiles][components.lots.name]

string

-

filter[profiles][components.lots.idTag]

string

-

filter[profiles][components.lots.search]

string

-

filter[profiles][machines.id]

string

-

filter[profiles][machines.location.id]

string

-

filter[profiles][machines.location.name]

string

-

filter[profiles][prototypes.createdDate.from]

dateTime

-

filter[profiles][prototypes.createdDate.to]

dateTime

-

filter[profiles][prototype.createdDate.from]

dateTime

-

filter[profiles][prototype.createdDate.to]

dateTime

-

filter[profiles][prototypes.lot.name]

string

-

filter[profiles][prototypes.lot.idTag]

string

-

filter[profiles][prototypes.lot.search]

string

-

filter[profiles][prototype.lot.name]

string

-

filter[profiles][prototype.lot.idTag]

string

-

filter[profiles][prototype.lot.search]

string

-

filter[profiles][hasGreenLot]

boolean

-

Sort Parameters

Name Value

sort[profiles][calculatedWeightChange]

asc/desc

sort[profiles][createdDate]

asc/desc

sort[profiles][lastModifiedDate]

asc/desc

sort[profiles][weightChange]

asc/desc

sort[profiles][name]

asc/desc

sort[profiles][profileComponents.length]

asc/desc

sort[profiles][id]

asc/desc

sort[profiles][profileLotReferencesLastModifiedDate]

asc/desc

sort[profiles][project.name]

asc/desc

sort[profiles][batchSize]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/profiles?filter[profiles][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "profiles",
    "attributes" : {
      "name" : "name",
      "batchSize" : null,
      "calculatedWeightChange" : 1.0,
      "createdDate" : 1575281700412,
      "erpId" : null,
      "isActive" : true,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "newLotName" : null,
      "notes" : null,
      "profileLotReferencesLastModifiedDate" : 1575281700412,
      "weightChange" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/group"
        }
      },
      "profileComponents" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileComponents"
        }
      },
      "profileLotReference" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profileLotReferences"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReference",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReference"
        }
      },
      "profileLotReferences" : {
        "data" : [ {
          "type" : "profileLotReferences",
          "id" : "AAAA"
        }, {
          "type" : "profileLotReferences",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReferences",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReferences"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/project"
        }
      },
      "referenceLot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLot",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLot"
        }
      },
      "referenceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLots",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLots"
        }
      },
      "restrictedMachines" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/restrictedMachines",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/restrictedMachines"
        }
      }
    }
  } ]
}
PATCH Update an existing profile

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"profiles","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/profiles/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "profiles",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "batchSize" : null,
      "calculatedWeightChange" : 1.0,
      "createdDate" : 1575281700412,
      "erpId" : null,
      "isActive" : true,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "newLotName" : null,
      "notes" : null,
      "profileLotReferencesLastModifiedDate" : 1575281700412,
      "weightChange" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/group"
        }
      },
      "profileComponents" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileComponents"
        }
      },
      "profileLotReference" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profileLotReferences"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReference",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReference"
        }
      },
      "profileLotReferences" : {
        "data" : [ {
          "type" : "profileLotReferences",
          "id" : "AAAA"
        }, {
          "type" : "profileLotReferences",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReferences",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReferences"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/project"
        }
      },
      "referenceLot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLot",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLot"
        }
      },
      "referenceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLots",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLots"
        }
      },
      "restrictedMachines" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/restrictedMachines",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/restrictedMachines"
        }
      }
    }
  }
}
POST Create a profile

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "profiles", "attributes" : { "name" : "name" }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } } } }}'
     'https://c-sar.cropster.com/api/v2/profiles'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "profiles",
    "attributes" : {
      "name" : "name",
      "batchSize" : null,
      "calculatedWeightChange" : 1.0,
      "createdDate" : 1575281700412,
      "erpId" : null,
      "isActive" : true,
      "isArchived" : null,
      "lastModifiedDate" : 1575281700412,
      "newLotName" : null,
      "notes" : null,
      "profileLotReferencesLastModifiedDate" : 1575281700412,
      "weightChange" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/group"
        }
      },
      "profileComponents" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileComponents",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileComponents"
        }
      },
      "profileLotReference" : {
        "data" : {
          "id" : "AAAA",
          "type" : "profileLotReferences"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReference",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReference"
        }
      },
      "profileLotReferences" : {
        "data" : [ {
          "type" : "profileLotReferences",
          "id" : "AAAA"
        }, {
          "type" : "profileLotReferences",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/profileLotReferences",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/profileLotReferences"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/project"
        }
      },
      "referenceLot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLot",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLot"
        }
      },
      "referenceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/referenceLots",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/referenceLots"
        }
      },
      "restrictedMachines" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/profiles/id/relationships/restrictedMachines",
          "related" : "https://c-sar.cropster.com/api/v2/profiles/id/restrictedMachines"
        }
      }
    }
  }
}

Production

Adjust Weight Actions

Type name: adjustWeightActions

This action allows changing the weight of a lot. The currentWeight must match the actualWeight of the lot at the moment the change is triggered. This acts as a safety net to avoid weight changes based on outdated information.

Attributes

Name Type Constraints Notes

comment

string

-

-

currentWeight

measure

required

Current weight of the lot used as a guard against outdated data.

isResetInitialWeight

boolean

-

Indicates if this action should reset the initial weight of the lot. If true, it is not possible to add a comment.

newWeight

measure

required

New desired weight of the lot.

Relationships

Name Constraints Notes

lot

required

Lot that shall have its weight updated.

POST Create a adjustWeightAction

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "adjustWeightActions", "attributes" : { "currentWeight" : { "amount" : 1, "unit" : "KG", "amountSI" : 1 }, "newWeight" : { "amount" : 1, "unit" : "KG", "amountSI" : 1 } }, "relationships" : { "lot" : { "data" : { "id" : "AAAA", "type" : "lots" } } } }}'
     'https://c-sar.cropster.com/api/v2/adjustWeightActions'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "adjustWeightActions",
    "attributes" : {
      "comment" : null,
      "currentWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "isResetInitialWeight" : null,
      "newWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/adjustWeightActions/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/adjustWeightActions/id/lot"
        }
      }
    }
  }
}

Certificates

Type name: certificates

Certificates represent common certifications seen on coffee. For example, Bird-Friendly is a strict "shade-grown” certification. It was developed by ecologists at the Smithsonian Migratory Bird Center and is awarded to farms that grow coffee under a canopy of trees, thus providing shelter for birds.

Attributes

Name Type Constraints Notes

name

string

read only

-

Relationships

This object has no relationships.

GET Get multiple specific certificates

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/certificates/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "certificates",
    "attributes" : {
      "name" : "name"
    },
    "relationships" : { }
  } ]
}
GET Get a specific certificate

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/certificates/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "certificates",
    "attributes" : {
      "name" : "name"
    },
    "relationships" : { }
  }
}
GET List all certificates

This request does not support any filter parameters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/certificates?page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "certificates",
    "attributes" : {
      "name" : "name"
    },
    "relationships" : { }
  } ]
}

Lots

Type name: lots

Lots are at the heart of Cropster, representing the agricultural product itself in the system.

There are two types of lots used within Cropster.

  1. Sample lots: Sample lots represent small amounts of a product, often used for quality evaluation before commitment to a purchase. Samples have an ID tag in the format SG-XXXX. SG stands for Sample Green. The isSample flag of such lots will be set to true.

  2. Inventory lots: As opposed to a sample lot, an inventory lot is usually made up of several bags or crates. These lots are registered with an ID tag in the format PG-XXXX. PG stands for Production Green. For example, a portion of green coffee to be used for production roasting would be represented as an inventory lot rather than a sample lot. Inventory lots will have their isSample flag set to false.

Another very important trait of lots is their processingStep. The processingStep indicates the 'form' of the good, e.g. if coffee is still 'green' or already 'roasted'. Via filtering on the processingStep you can decide whether you want to load information for roasted coffee or green coffee, to give one example.

Attributes

Name Type Constraints Notes

idTag

string

read only

-

name

string

-

-

accepted

lotAcceptanceType

-

-

actualWeight

measure

required

-

arrivalDate

dateTime

-

-

consumedDate

dateTime

-

-

countriesOfOrigin

country[]

-

-

creationDate

dateTime

-

-

cropYear

string

-

-

erpId

string

-

-

estimatedNumberOfWeeksUntilRunningOut

integer

read only

Estimated number of weeks until this lot will be running out. null if this lot does not have an estimation or the lot will not run out within the next 8 weeks. Use 'hasRunningOutEstimation' to determine which is the case.

expectedWeight

measure

-

-

grade

string

-

-

hasRunningOutEstimation

boolean

read only

If this lot has a running out estimation.

icoNumber

string

-

-

initialWeight

measure

read only

The actual weight is used as the initial weight.

isActive

boolean

read only

To set this to false, use the DELETE request.

isSample

boolean

init only

-

lastModifiedDate

dateTime

read only

-

lowStockThreshold

measure

-

-

notes

string

-

-

price

monetaryValue

-

If the priceBaseUnit is set, the price must also be set.

priceBaseUnit

measure

-

If the price is set, the priceBaseUnit must also be set.

processingMethods

processingMethod[]

-

-

processingStep

string

required

-

purchaseOrderNumber

string

-

-

ratingNotes

string

-

-

salesNumber

string

-

-

sampleType

sampleType

-

Only supported for sample lots, i.e. if the isSample attribute is true.

shippingContainerNumber

string

-

-

trackingNumber

string

-

-

unbalancedWeight

measure

read only

-

Relationships

Name Constraints Notes

blendProfile

-

-

certificates

-

-

destinationLots

read only

A destination lot is a lot, whose weightcame in parts from the current lot. Returns 50 of the newest destination lots.

group

required
init only

The group must have the group.productTypes property defined.

latestSampleGroupSensorialQc

read only

Latest sensorial QC for samples in source sample group. Only returned for inventory lot.

latestSensorialQc

read only

-

location

-

-

physicalResults

read only

-

processing

read only

-

project

-

-

sensorialQcs

read only

-

sourceBatch

read only

-

sourceBatchMix

read only

-

sourceContacts

-

-

sourceLots

read only

A source lot is a lot, whose weightcontributed to the current lot. Returns 50 of the newest source lots.

usedInProfiles

read only

Only relevant for green lots, all of the profiles where this lot is actively being used.

variety

-

-

DELETE Delete a specific lot

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/lots/<ID>'

Response body

N/A
GET Get multiple specific lots

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/lots/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "lots",
    "attributes" : {
      "idTag" : "idTag",
      "name" : null,
      "accepted" : null,
      "actualWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "arrivalDate" : null,
      "consumedDate" : null,
      "countriesOfOrigin" : [ ],
      "creationDate" : null,
      "cropYear" : null,
      "erpId" : null,
      "estimatedNumberOfWeeksUntilRunningOut" : 1,
      "expectedWeight" : null,
      "grade" : null,
      "hasRunningOutEstimation" : true,
      "icoNumber" : null,
      "initialWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "isActive" : true,
      "isSample" : null,
      "lastModifiedDate" : 1575281700412,
      "lowStockThreshold" : null,
      "notes" : null,
      "price" : null,
      "priceBaseUnit" : null,
      "processingMethods" : [ ],
      "processingStep" : "processingStep",
      "purchaseOrderNumber" : null,
      "ratingNotes" : null,
      "salesNumber" : null,
      "sampleType" : null,
      "shippingContainerNumber" : null,
      "trackingNumber" : null,
      "unbalancedWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/blendProfile"
        }
      },
      "certificates" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/certificates",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/certificates"
        }
      },
      "destinationLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/destinationLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/destinationLots"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/group"
        }
      },
      "latestSampleGroupSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSampleGroupSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSampleGroupSensorialQc"
        }
      },
      "latestSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSensorialQc"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/location"
        }
      },
      "physicalResults" : {
        "data" : [ {
          "type" : "physicalResults",
          "id" : "AAAA"
        }, {
          "type" : "physicalResults",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/physicalResults",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/physicalResults"
        }
      },
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/processing"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/project"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sensorialQcs"
        }
      },
      "sourceBatch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatch",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatch"
        }
      },
      "sourceBatchMix" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batchMixes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatchMix",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatchMix"
        }
      },
      "sourceContacts" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceContacts",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceContacts"
        }
      },
      "sourceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceLots"
        }
      },
      "usedInProfiles" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/usedInProfiles",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/usedInProfiles"
        }
      },
      "variety" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/variety",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/variety"
        }
      }
    }
  } ]
}
GET Get a specific lot

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/lots/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "lots",
    "attributes" : {
      "idTag" : "idTag",
      "name" : null,
      "accepted" : null,
      "actualWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "arrivalDate" : null,
      "consumedDate" : null,
      "countriesOfOrigin" : [ ],
      "creationDate" : null,
      "cropYear" : null,
      "erpId" : null,
      "estimatedNumberOfWeeksUntilRunningOut" : 1,
      "expectedWeight" : null,
      "grade" : null,
      "hasRunningOutEstimation" : true,
      "icoNumber" : null,
      "initialWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "isActive" : true,
      "isSample" : null,
      "lastModifiedDate" : 1575281700412,
      "lowStockThreshold" : null,
      "notes" : null,
      "price" : null,
      "priceBaseUnit" : null,
      "processingMethods" : [ ],
      "processingStep" : "processingStep",
      "purchaseOrderNumber" : null,
      "ratingNotes" : null,
      "salesNumber" : null,
      "sampleType" : null,
      "shippingContainerNumber" : null,
      "trackingNumber" : null,
      "unbalancedWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/blendProfile"
        }
      },
      "certificates" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/certificates",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/certificates"
        }
      },
      "destinationLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/destinationLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/destinationLots"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/group"
        }
      },
      "latestSampleGroupSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSampleGroupSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSampleGroupSensorialQc"
        }
      },
      "latestSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSensorialQc"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/location"
        }
      },
      "physicalResults" : {
        "data" : [ {
          "type" : "physicalResults",
          "id" : "AAAA"
        }, {
          "type" : "physicalResults",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/physicalResults",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/physicalResults"
        }
      },
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/processing"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/project"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sensorialQcs"
        }
      },
      "sourceBatch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatch",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatch"
        }
      },
      "sourceBatchMix" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batchMixes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatchMix",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatchMix"
        }
      },
      "sourceContacts" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceContacts",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceContacts"
        }
      },
      "sourceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceLots"
        }
      },
      "usedInProfiles" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/usedInProfiles",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/usedInProfiles"
        }
      },
      "variety" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/variety",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/variety"
        }
      }
    }
  }
}
GET List all lots

Filter Parameters

Name Type Constraints Notes

filter[lots][group]

string

required

-

filter[lots][name]

string

-

Repeatable, objects must match at least one.

filter[lots][idTag]

string

-

Repeatable, objects must match at least one.

filter[lots][project]

string

-

Repeatable, objects must match at least one.

filter[lots][processingStep]

string

-

Repeatable, objects must match at least one.

filter[lots][isSample]

boolean

-

-

filter[lots][isLatestProfileReference]

string

-

-

filter[lots][hasLowStock]

boolean

-

-

filter[lots][includeConsumed]

boolean

-

Default is true

filter[lots][creationDate.from]

dateTime

-

filter[lots][creationDate.to]

dateTime

-

-

filter[lots][modifiedDate.from]

dateTime

-

-

filter[lots][locations]

string

-

Repeatable, objects must match at least one.

filter[lots][certificates]

string

-

Repeatable, objects must match at least one.

filter[lots][hasFailedGoals]

boolean

-

-

filter[lots][hasSensorialQcs]

boolean

-

-

filter[lots][erpId]

string

-

-

filter[lots][processingMethods]

processingMethod

-

Repeatable, objects must match at least one.

filter[lots][purchaseOrderNumber]

string

-

-

filter[lots][salesNumber]

string

-

-

filter[lots][icoNumber]

string

-

-

filter[lots][trackingNumber]

string

-

-

filter[lots][searchTerm]

string

-

Repeatable, objects must match at least one. The search term should look for lot.idTag or lot.name matches.

filter[lots][accepted]

lotAcceptanceType

-

-

filter[lots][variety.name]

string

-

Supports a fuzzy search

filter[lots][arrivalDate.from]

dateTime

-

-

filter[lots][arrivalDate.to]

dateTime

-

-

filter[lots][sampleType]

sampleType

-

Repeatable, objects must match at least one.

filter[lots][scheduledProcessing.scheduleProfile.schedule]

string

-

Repeatable, objects must match at least one.

filter[lots][blendProfile]

string

-

Repeatable, objects must match at least one.

filter[lots][processing.machine]

string

-

Repeatable, objects must match at least one.

filter[lots][processing.profile]

string

-

Repeatable, objects must match at least one.

filter[lots][processing.worker]

string

-

Repeatable, objects must match at least one.

filter[lots][sourceContacts.contact]

string

-

Repeatable, objects must match at least one.

filter[lots][sourceLots]

string

-

Repeatable, objects must match at least one.

filter[lots][sourceLots.idTag]

string

-

Repeatable, objects must match at least one.

filter[lots][sourceLots.name]

string

-

Repeatable, objects must match at least one.

filter[lots][sourceLots.searchTerm]

string

-

-

filter[lots][cropYear]

string

-

Repeatable, objects must match at least one.

filter[lots][grade]

string

-

-

filter[lots][countriesOfOrigin]

country

-

Repeatable, objects must match at least one.

filter[lots][shippingContainerNumber]

string

-

-

filter[lots][runningOutEstimation][from]

long

-

Includes only lots that have a running out estimation

filter[lots][runningOutEstimation][to]

long

-

Includes only lots that have a running out estimation

Sort Parameters

Name Value

sort[lots][id]

asc/desc

sort[lots][idTag]

asc/desc

sort[lots][name]

asc/desc

sort[lots][creationDate]

asc/desc

sort[lots][lastModifiedDate]

asc/desc

sort[lots][sampleType]

asc/desc

sort[lots][grade]

asc/desc

sort[lots][weight]

asc/desc

sort[lots][initialWeight]

asc/desc

sort[lots][actualWeight]

asc/desc

sort[lots][location]

asc/desc

sort[lots][location.name]

asc/desc

sort[lots][project.name]

asc/desc

sort[lots][machine]

asc/desc

sort[lots][processing.machine.name]

asc/desc

sort[lots][processing.machine.type]

asc/desc

sort[lots][processing.machine.identifier]

asc/desc

sort[lots][processing.startWeight]

asc/desc

sort[lots][processing.endWeight]

asc/desc

sort[lots][profile]

asc/desc

sort[lots][processing.profile.name]

asc/desc

sort[lots][worker]

asc/desc

sort[lots][processing.worker]

asc/desc

sort[lots][salesNumber]

asc/desc

sort[lots][trackingNumber]

asc/desc

sort[lots][accepted]

asc/desc

sort[lots][cropYear]

asc/desc

sort[lots][erpId]

asc/desc

sort[lots][icoNumber]

asc/desc

sort[lots][price]

asc/desc

sort[lots][expectedWeight]

asc/desc

sort[lots][arrivalDate]

asc/desc

sort[lots][variety.name]

asc/desc

sort[lots][estimatedNumberOfWeeksUntilRunningOut]

asc/desc

sort[lots][purchaseOrderNumber]

asc/desc

sort[lots][shippingContainerNumber]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/lots?filter[lots][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "lots",
    "attributes" : {
      "idTag" : "idTag",
      "name" : null,
      "accepted" : null,
      "actualWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "arrivalDate" : null,
      "consumedDate" : null,
      "countriesOfOrigin" : [ ],
      "creationDate" : null,
      "cropYear" : null,
      "erpId" : null,
      "estimatedNumberOfWeeksUntilRunningOut" : 1,
      "expectedWeight" : null,
      "grade" : null,
      "hasRunningOutEstimation" : true,
      "icoNumber" : null,
      "initialWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "isActive" : true,
      "isSample" : null,
      "lastModifiedDate" : 1575281700412,
      "lowStockThreshold" : null,
      "notes" : null,
      "price" : null,
      "priceBaseUnit" : null,
      "processingMethods" : [ ],
      "processingStep" : "processingStep",
      "purchaseOrderNumber" : null,
      "ratingNotes" : null,
      "salesNumber" : null,
      "sampleType" : null,
      "shippingContainerNumber" : null,
      "trackingNumber" : null,
      "unbalancedWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/blendProfile"
        }
      },
      "certificates" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/certificates",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/certificates"
        }
      },
      "destinationLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/destinationLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/destinationLots"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/group"
        }
      },
      "latestSampleGroupSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSampleGroupSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSampleGroupSensorialQc"
        }
      },
      "latestSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSensorialQc"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/location"
        }
      },
      "physicalResults" : {
        "data" : [ {
          "type" : "physicalResults",
          "id" : "AAAA"
        }, {
          "type" : "physicalResults",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/physicalResults",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/physicalResults"
        }
      },
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/processing"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/project"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sensorialQcs"
        }
      },
      "sourceBatch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatch",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatch"
        }
      },
      "sourceBatchMix" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batchMixes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatchMix",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatchMix"
        }
      },
      "sourceContacts" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceContacts",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceContacts"
        }
      },
      "sourceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceLots"
        }
      },
      "usedInProfiles" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/usedInProfiles",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/usedInProfiles"
        }
      },
      "variety" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/variety",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/variety"
        }
      }
    }
  } ]
}
PATCH Update an existing lot

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"lots","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/lots/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "lots",
    "attributes" : {
      "idTag" : "idTag",
      "name" : <UPDATED_VALUE>,
      "accepted" : null,
      "actualWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "arrivalDate" : null,
      "consumedDate" : null,
      "countriesOfOrigin" : [ ],
      "creationDate" : null,
      "cropYear" : null,
      "erpId" : null,
      "estimatedNumberOfWeeksUntilRunningOut" : 1,
      "expectedWeight" : null,
      "grade" : null,
      "hasRunningOutEstimation" : true,
      "icoNumber" : null,
      "initialWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "isActive" : true,
      "isSample" : null,
      "lastModifiedDate" : 1575281700412,
      "lowStockThreshold" : null,
      "notes" : null,
      "price" : null,
      "priceBaseUnit" : null,
      "processingMethods" : [ ],
      "processingStep" : "processingStep",
      "purchaseOrderNumber" : null,
      "ratingNotes" : null,
      "salesNumber" : null,
      "sampleType" : null,
      "shippingContainerNumber" : null,
      "trackingNumber" : null,
      "unbalancedWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/blendProfile"
        }
      },
      "certificates" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/certificates",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/certificates"
        }
      },
      "destinationLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/destinationLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/destinationLots"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/group"
        }
      },
      "latestSampleGroupSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSampleGroupSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSampleGroupSensorialQc"
        }
      },
      "latestSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSensorialQc"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/location"
        }
      },
      "physicalResults" : {
        "data" : [ {
          "type" : "physicalResults",
          "id" : "AAAA"
        }, {
          "type" : "physicalResults",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/physicalResults",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/physicalResults"
        }
      },
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/processing"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/project"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sensorialQcs"
        }
      },
      "sourceBatch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatch",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatch"
        }
      },
      "sourceBatchMix" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batchMixes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatchMix",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatchMix"
        }
      },
      "sourceContacts" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceContacts",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceContacts"
        }
      },
      "sourceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceLots"
        }
      },
      "usedInProfiles" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/usedInProfiles",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/usedInProfiles"
        }
      },
      "variety" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/variety",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/variety"
        }
      }
    }
  }
}
POST Create a lot

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "lots", "attributes" : { "actualWeight" : { "amount" : 1, "unit" : "KG", "amountSI" : 1 }, "processingStep" : "processingStep" }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } } } }}'
     'https://c-sar.cropster.com/api/v2/lots'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "lots",
    "attributes" : {
      "idTag" : "idTag",
      "name" : null,
      "accepted" : null,
      "actualWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "arrivalDate" : null,
      "consumedDate" : null,
      "countriesOfOrigin" : [ ],
      "creationDate" : null,
      "cropYear" : null,
      "erpId" : null,
      "estimatedNumberOfWeeksUntilRunningOut" : 1,
      "expectedWeight" : null,
      "grade" : null,
      "hasRunningOutEstimation" : true,
      "icoNumber" : null,
      "initialWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      },
      "isActive" : true,
      "isSample" : null,
      "lastModifiedDate" : 1575281700412,
      "lowStockThreshold" : null,
      "notes" : null,
      "price" : null,
      "priceBaseUnit" : null,
      "processingMethods" : [ ],
      "processingStep" : "processingStep",
      "purchaseOrderNumber" : null,
      "ratingNotes" : null,
      "salesNumber" : null,
      "sampleType" : null,
      "shippingContainerNumber" : null,
      "trackingNumber" : null,
      "unbalancedWeight" : {
        "amount" : 1,
        "unit" : "KG",
        "amountSI" : 1
      }
    },
    "relationships" : {
      "blendProfile" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/blendProfile",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/blendProfile"
        }
      },
      "certificates" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/certificates",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/certificates"
        }
      },
      "destinationLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/destinationLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/destinationLots"
        }
      },
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/group"
        }
      },
      "latestSampleGroupSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSampleGroupSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSampleGroupSensorialQc"
        }
      },
      "latestSensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/latestSensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/latestSensorialQc"
        }
      },
      "location" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/location",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/location"
        }
      },
      "physicalResults" : {
        "data" : [ {
          "type" : "physicalResults",
          "id" : "AAAA"
        }, {
          "type" : "physicalResults",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/physicalResults",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/physicalResults"
        }
      },
      "processing" : {
        "data" : {
          "id" : "AAAA",
          "type" : "processings"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/processing",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/processing"
        }
      },
      "project" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/project",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/project"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sensorialQcs"
        }
      },
      "sourceBatch" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batches"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatch",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatch"
        }
      },
      "sourceBatchMix" : {
        "data" : {
          "id" : "AAAA",
          "type" : "batchMixes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceBatchMix",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceBatchMix"
        }
      },
      "sourceContacts" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceContacts",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceContacts"
        }
      },
      "sourceLots" : {
        "data" : [ {
          "type" : "lots",
          "id" : "AAAA"
        }, {
          "type" : "lots",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/sourceLots",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/sourceLots"
        }
      },
      "usedInProfiles" : {
        "data" : [ {
          "type" : "profileComponents",
          "id" : "AAAA"
        }, {
          "type" : "profileComponents",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/usedInProfiles",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/usedInProfiles"
        }
      },
      "variety" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/lots/id/relationships/variety",
          "related" : "https://c-sar.cropster.com/api/v2/lots/id/variety"
        }
      }
    }
  }
}

Product Types

Type name: productTypes

Attributes

Name Type Constraints Notes

id

string

-

This is the name of the product type, e.g. coffee. It must be unique.

Relationships

This object has no relationships.

GET Get a specific productType

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/productTypes/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "productTypes",
    "attributes" : { },
    "relationships" : { }
  }
}
GET List all productTypes

Filter Parameters

Name Type Constraints Notes

filter[productTypes][group]

string

required

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/productTypes?filter[productTypes][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "productTypes",
    "attributes" : { },
    "relationships" : { }
  } ]
}

Projects

Type name: projects

Projects act like a type of tag that you may assign to your lots, for example "Organic coffee from Rwanda".

Deletion of a project is not supported. To remove a project from the list of current projects, set the isArchived flag to true.

Attributes

Name Type Constraints Notes

name

string

required

The name of the project must be unique.

description

string

-

-

isArchived

boolean

-

-

Relationships

Name Constraints Notes

group

required

-

GET Get multiple specific projects

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/projects/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "projects",
    "attributes" : {
      "name" : "name",
      "description" : null,
      "isArchived" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/projects/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/projects/id/group"
        }
      }
    }
  } ]
}
GET Get a specific project

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/projects/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "projects",
    "attributes" : {
      "name" : "name",
      "description" : null,
      "isArchived" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/projects/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/projects/id/group"
        }
      }
    }
  }
}
GET List all projects

Filter Parameters

Name Type Constraints Notes

filter[projects][group]

string

required

-

filter[projects][includeArchived]

string

-

Default is true

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/projects?filter[projects][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "projects",
    "attributes" : {
      "name" : "name",
      "description" : null,
      "isArchived" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/projects/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/projects/id/group"
        }
      }
    }
  } ]
}
PATCH Update an existing project

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"projects","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/projects/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "projects",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "description" : null,
      "isArchived" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/projects/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/projects/id/group"
        }
      }
    }
  }
}
POST Create a project

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "projects", "attributes" : { "name" : "name" }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } } } }}'
     'https://c-sar.cropster.com/api/v2/projects'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "projects",
    "attributes" : {
      "name" : "name",
      "description" : null,
      "isArchived" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/projects/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/projects/id/group"
        }
      }
    }
  }
}

Source Contacts

Type name: sourceContacts

Source contacts allow for traceability of a lot’s origin. Multiple entities may have been involved in the production chain of a lot. Retrieving the source contacts of a lot will tell you who they were. Data of a source contact is immutable. If data was created in error, the object must be deleted and recreated with the corrected data.

Attributes

This endpoint has no attributes.

Relationships

Name Constraints Notes

contact

required

-

contactRole

required

-

lot

required

-

DELETE Delete a specific sourceContact

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sourceContacts/<ID>'

Response body

N/A
GET Get multiple specific sourceContacts

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sourceContacts/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sourceContacts",
    "attributes" : { },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/contact"
        }
      },
      "contactRole" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contactRoles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/contactRole",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/contactRole"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/lot"
        }
      }
    }
  } ]
}
GET Get a specific sourceContact

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sourceContacts/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sourceContacts",
    "attributes" : { },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/contact"
        }
      },
      "contactRole" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contactRoles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/contactRole",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/contactRole"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/lot"
        }
      }
    }
  }
}
PATCH Update an existing sourceContact

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"sourceContacts","relationships":{"contact":{"data":{"id":<UPDATED_VALUE>,"type":"contacts"},"links":{"self":"https://c-sar.cropster.com/api/v2/sourceContacts/AAAA/relationships/contact","related":"https://c-sar.cropster.com/api/v2/sourceContacts/AAAA/contact"}}}}}'
     'https://c-sar.cropster.com/api/v2/sourceContacts/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "sourceContacts",
    "attributes" : { },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : <UPDATED_VALUE>,
          "type" : "contacts"
        }
      },
      "contactRole" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contactRoles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/contactRole",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/contactRole"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/lot"
        }
      }
    }
  }
}
POST Create a sourceContact

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "sourceContacts", "attributes" : { }, "relationships" : { "contact" : { "data" : { "id" : "AAAA", "type" : "contacts" } }, "contactRole" : { "data" : { "id" : "AAAA", "type" : "contactRoles" } }, "lot" : { "data" : { "id" : "AAAA", "type" : "lots" } } } }}'
     'https://c-sar.cropster.com/api/v2/sourceContacts'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sourceContacts",
    "attributes" : { },
    "relationships" : {
      "contact" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contacts"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/contact",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/contact"
        }
      },
      "contactRole" : {
        "data" : {
          "id" : "AAAA",
          "type" : "contactRoles"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/contactRole",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/contactRole"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sourceContacts/id/lot"
        }
      }
    }
  }
}

Varieties

Type name: varieties

In Cropster, a variety does not follow the strict definition of a variety as given by the International Union for the Protection of New Varieties of Plants (UPOV). It is rather a loose interpretation that includes coffee varieties that are commonly known to farmers and grown widely in the region. For example, Pacamara does not meet the strict definition but is used regionally and thus included as a variety.

Attributes

Name Type Constraints Notes

name

string

required

-

Relationships

Name Constraints Notes

productType

required
init only

-

GET Get multiple specific varieties

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/varieties/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "varieties",
    "attributes" : {
      "name" : "name"
    },
    "relationships" : {
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/varieties/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/varieties/id/productType"
        }
      }
    }
  } ]
}
GET Get a specific variety

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/varieties/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "varieties",
    "attributes" : {
      "name" : "name"
    },
    "relationships" : {
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/varieties/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/varieties/id/productType"
        }
      }
    }
  }
}
GET List all varieties

Filter Parameters

Name Type Constraints Notes

filter[varieties][group]

string

required

-

filter[varieties][productType]

string

-

-

filter[varieties][name]

string

-

-

filter[varieties][isVerified]

boolean

-

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/varieties?filter[varieties][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "varieties",
    "attributes" : {
      "name" : "name"
    },
    "relationships" : {
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/varieties/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/varieties/id/productType"
        }
      }
    }
  } ]
}
POST Create a variety

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "varieties", "attributes" : { "name" : "name" }, "relationships" : { "productType" : { "data" : { "id" : "AAAA", "type" : "productTypes" } } } }}'
     'https://c-sar.cropster.com/api/v2/varieties'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "varieties",
    "attributes" : {
      "name" : "name"
    },
    "relationships" : {
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/varieties/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/varieties/id/productType"
        }
      }
    }
  }
}

Quality

Flavors

Type name: flavors

Flavors describe sensorial qualities, like the aroma or savor of a coffee. In Cropster, there is a set of global flavors that are available to all groups. These flavors have no JSON API relationship with their group. However, each group may also create and manage its own set of flavors, which will then have a relationship to this group. It is only possible to create group specific flavors via the API.

Attributes

Name Type Constraints Notes

name

string

required

-

isDirty

boolean

-

A dirty flavor is a newly created flavor that has not yet been approved by the group administrator. The default value is true.

isPositive

boolean

-

Default is true.

Relationships

Name Constraints Notes

group

required
init only

-

productType

required
init only

-

DELETE Delete a specific flavor

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/flavors/<ID>'

Response body

N/A
GET Get multiple specific flavors

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/flavors/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "flavors",
    "attributes" : {
      "name" : "name",
      "isDirty" : null,
      "isPositive" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/group"
        }
      },
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/productType"
        }
      }
    }
  } ]
}
GET Get a specific flavor

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/flavors/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "flavors",
    "attributes" : {
      "name" : "name",
      "isDirty" : null,
      "isPositive" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/group"
        }
      },
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/productType"
        }
      }
    }
  }
}
GET List all flavors

Filter Parameters

Name Type Constraints Notes

filter[flavors][group]

string

-

Repeatable, objects must match at least one. To load all group specific flavors and global flavors, filter by group name and group=null.

filter[flavors][name]

string

-

-

filter[flavors][dirty]

boolean

-

-

filter[flavors][positive]

boolean

-

-

filter[flavors][productType]

string

required

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/flavors?filter[flavors][productType]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "flavors",
    "attributes" : {
      "name" : "name",
      "isDirty" : null,
      "isPositive" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/group"
        }
      },
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/productType"
        }
      }
    }
  } ]
}
PATCH Update an existing flavor

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"flavors","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/flavors/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "flavors",
    "attributes" : {
      "name" : <UPDATED_VALUE>,
      "isDirty" : null,
      "isPositive" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/group"
        }
      },
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/productType"
        }
      }
    }
  }
}
POST Create a flavor

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "flavors", "attributes" : { "name" : "name" }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } }, "productType" : { "data" : { "id" : "AAAA", "type" : "productTypes" } } } }}'
     'https://c-sar.cropster.com/api/v2/flavors'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "flavors",
    "attributes" : {
      "name" : "name",
      "isDirty" : null,
      "isPositive" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/group"
        }
      },
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/flavors/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/flavors/id/productType"
        }
      }
    }
  }
}

Sensorial Descriptors

Type name: sensorialDescriptors

A descriptor is a flavor that has been assigned to a sensorial result item. It can be positive or negative and have a specific intensity.

Attributes

Name Type Constraints Notes

intensity

integer

-

-

isPositive

boolean

-

-

Relationships

Name Constraints Notes

flavor

required

-

sensorialResultItem

required

-

DELETE Delete a specific sensorialDescriptor

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialDescriptors/<ID>'

Response body

N/A
GET Get multiple specific sensorialDescriptors

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialDescriptors/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialDescriptors",
    "attributes" : {
      "intensity" : null,
      "isPositive" : null
    },
    "relationships" : {
      "flavor" : {
        "data" : {
          "id" : "AAAA",
          "type" : "flavors"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/relationships/flavor",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/flavor"
        }
      },
      "sensorialResultItem" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialResultItems"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/relationships/sensorialResultItem",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/sensorialResultItem"
        }
      }
    }
  } ]
}
GET Get a specific sensorialDescriptor

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialDescriptors/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialDescriptors",
    "attributes" : {
      "intensity" : null,
      "isPositive" : null
    },
    "relationships" : {
      "flavor" : {
        "data" : {
          "id" : "AAAA",
          "type" : "flavors"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/relationships/flavor",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/flavor"
        }
      },
      "sensorialResultItem" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialResultItems"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/relationships/sensorialResultItem",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/sensorialResultItem"
        }
      }
    }
  }
}
PATCH Update an existing sensorialDescriptor

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"sensorialDescriptors","attributes":{"intensity":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/sensorialDescriptors/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialDescriptors",
    "attributes" : {
      "intensity" : <UPDATED_VALUE>,
      "isPositive" : null
    },
    "relationships" : {
      "flavor" : {
        "data" : {
          "id" : "AAAA",
          "type" : "flavors"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/relationships/flavor",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/flavor"
        }
      },
      "sensorialResultItem" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialResultItems"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/relationships/sensorialResultItem",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/sensorialResultItem"
        }
      }
    }
  }
}
POST Create a sensorialDescriptor

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "sensorialDescriptors", "attributes" : { }, "relationships" : { "flavor" : { "data" : { "id" : "AAAA", "type" : "flavors" } }, "sensorialResultItem" : { "data" : { "id" : "AAAA", "type" : "sensorialResultItems" } } } }}'
     'https://c-sar.cropster.com/api/v2/sensorialDescriptors'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialDescriptors",
    "attributes" : {
      "intensity" : null,
      "isPositive" : null
    },
    "relationships" : {
      "flavor" : {
        "data" : {
          "id" : "AAAA",
          "type" : "flavors"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/relationships/flavor",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/flavor"
        }
      },
      "sensorialResultItem" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialResultItems"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/relationships/sensorialResultItem",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialDescriptors/id/sensorialResultItem"
        }
      }
    }
  }
}

Sensorial QCs

Type name: sensorialQcs

QC is a collection of sensorial results for a certain lot for a specific cupping or tasting event. It has an average final score, which is calculated from its sensorial results. A lot may have multiple QCs if it has been cupped or tasted multiple times. A sensorial session has one sensorialQC per lot.

Attributes

Name Type Constraints Notes

idTag

string

read only

-

category

string

-

-

createdDate

dateTime

read only

-

description

string

-

-

isActive

boolean

-

-

lab

string

-

-

lastModifiedDate

dateTime

read only

-

resultSummary

qcSummary

read only

E.g. {"averageScore": "76.0", "samplesCount": 1, "minSpread": "-0.0", "maxSpread": "+0.0"}.

resultType

string

read only

-

sampleCode

string

read only

-

scheduleDate

dateTime

-

-

weight

measure

-

-

Relationships

Name Constraints Notes

group

required
init only

-

lot

required
init only

-

sensorialResults

-

-

sensorialSession

required
init only

-

sensorialSheet

-

-

DELETE Delete a specific sensorialQc

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialQcs/<ID>'

Response body

N/A
GET Get multiple specific sensorialQcs

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialQcs/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialQcs",
    "attributes" : {
      "idTag" : "idTag",
      "category" : null,
      "createdDate" : 1575281700412,
      "description" : null,
      "isActive" : null,
      "lab" : null,
      "lastModifiedDate" : 1575281700412,
      "resultSummary" : {
        "averageScore" : "76.0",
        "samplesCount" : 1,
        "minSpread" : "-0.0",
        "maxSpread" : "+0.0"
      },
      "resultType" : "resultType",
      "sampleCode" : "sampleCode",
      "scheduleDate" : null,
      "weight" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/lot"
        }
      },
      "sensorialResults" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialResults",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialResults"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSheet"
        }
      }
    }
  } ]
}
GET Get a specific sensorialQc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialQcs/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialQcs",
    "attributes" : {
      "idTag" : "idTag",
      "category" : null,
      "createdDate" : 1575281700412,
      "description" : null,
      "isActive" : null,
      "lab" : null,
      "lastModifiedDate" : 1575281700412,
      "resultSummary" : {
        "averageScore" : "76.0",
        "samplesCount" : 1,
        "minSpread" : "-0.0",
        "maxSpread" : "+0.0"
      },
      "resultType" : "resultType",
      "sampleCode" : "sampleCode",
      "scheduleDate" : null,
      "weight" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/lot"
        }
      },
      "sensorialResults" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialResults",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialResults"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSheet"
        }
      }
    }
  }
}
GET List all sensorialQcs

Filter Parameters

Name Type Constraints Notes

filter[sensorialQcs][historyForLot]

string

-

If included, returns the historical cupping sensorialQcs for the given lot’s id. All other filters are ignored.

filter[sensorialQcs][scheduleDate.from]

dateTime

-

-

filter[sensorialQcs][scheduleDate.to]

dateTime

-

-

filter[sensorialQcs][group]

string

-

-

filter[sensorialQcs][idTag]

string

-

-

filter[sensorialQcs][category]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][sensorialSheet]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][sensorialSheet.name]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lab]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][sensorialResults.evaluator]

string

-

-

filter[sensorialQcs][lot]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.name]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.idTag]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.project]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.blendProfile]

string

-

-

filter[sensorialQcs][lot.processing.profile]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][hasResults]

boolean

-

-

filter[sensorialQcs][sensorialSession]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][sensorialSession.name]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][sensorialSession.idTag]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][averageScore.from]

float

-

-

filter[sensorialQcs][averageScore.to]

float

-

-

filter[sensorialQcs][averageScore.from]

float

-

-

filter[sensorialQcs][averageScore.to]

float

-

-

filter[sensorialQcs][hasNegativeSensorialDescriptors]

boolean

-

-

filter[sensorialQcs][hasHigherScoreThanReference]

boolean

-

-

filter[sensorialQcs][lot.searchTerm]

string

-

-

filter[sensorialQcs][lot.trackingNumber]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.salesNumber]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.purchaseOrderNumber]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.sampleType]

sampleType

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.location]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.sourceContacts.contact]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.processingMethods]

processingMethod

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.cropYear]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.countriesOfOrigin]

country

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.processingStep]

string

-

Repeatable, objects must match at least one.

filter[sensorialQcs][lot.erpId]

string

-

Repeatable, objects must match at least one.

Sort Parameters

Name Value

sort[sensorialQcs][id]

asc/desc

sort[sensorialQcs][scheduleDate]

asc/desc

sort[sensorialQcs][idTag]

asc/desc

sort[sensorialQcs][lab]

asc/desc

sort[sensorialQcs][sensorialSheet.name]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/sensorialQcs?filter[sensorialQcs][historyForLot]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialQcs",
    "attributes" : {
      "idTag" : "idTag",
      "category" : null,
      "createdDate" : 1575281700412,
      "description" : null,
      "isActive" : null,
      "lab" : null,
      "lastModifiedDate" : 1575281700412,
      "resultSummary" : {
        "averageScore" : "76.0",
        "samplesCount" : 1,
        "minSpread" : "-0.0",
        "maxSpread" : "+0.0"
      },
      "resultType" : "resultType",
      "sampleCode" : "sampleCode",
      "scheduleDate" : null,
      "weight" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/lot"
        }
      },
      "sensorialResults" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialResults",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialResults"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSheet"
        }
      }
    }
  } ]
}
PATCH Update an existing sensorialQc

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"sensorialQcs","attributes":{"category":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/sensorialQcs/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialQcs",
    "attributes" : {
      "idTag" : "idTag",
      "category" : <UPDATED_VALUE>,
      "createdDate" : 1575281700412,
      "description" : null,
      "isActive" : null,
      "lab" : null,
      "lastModifiedDate" : 1575281700412,
      "resultSummary" : {
        "averageScore" : "76.0",
        "samplesCount" : 1,
        "minSpread" : "-0.0",
        "maxSpread" : "+0.0"
      },
      "resultType" : "resultType",
      "sampleCode" : "sampleCode",
      "scheduleDate" : null,
      "weight" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/lot"
        }
      },
      "sensorialResults" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialResults",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialResults"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSheet"
        }
      }
    }
  }
}
POST Create a sensorialQc

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "sensorialQcs", "attributes" : { }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } }, "lot" : { "data" : { "id" : "AAAA", "type" : "lots" } }, "sensorialSession" : { "data" : { "id" : "AAAA", "type" : "sensorialSessions" } } } }}'
     'https://c-sar.cropster.com/api/v2/sensorialQcs'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialQcs",
    "attributes" : {
      "idTag" : "idTag",
      "category" : null,
      "createdDate" : 1575281700412,
      "description" : null,
      "isActive" : null,
      "lab" : null,
      "lastModifiedDate" : 1575281700412,
      "resultSummary" : {
        "averageScore" : "76.0",
        "samplesCount" : 1,
        "minSpread" : "-0.0",
        "maxSpread" : "+0.0"
      },
      "resultType" : "resultType",
      "sampleCode" : "sampleCode",
      "scheduleDate" : null,
      "weight" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/group"
        }
      },
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/lot"
        }
      },
      "sensorialResults" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialResults",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialResults"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : null,
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialQcs/id/sensorialSheet"
        }
      }
    }
  }
}

Sensorial Result Items

Type name: sensorialResultItems

Every result has a result item per sensorial sheet item. The final score is calculated from all of the result items.

Attributes

Name Type Constraints Notes

calculatedQuality

float

read only

-

intensity

float

-

-

quality

float

-

-

Relationships

Name Constraints Notes

sensorialDescriptors

read only

-

sensorialResult

required

-

sensorialSheetItem

required

-

GET Get multiple specific sensorialResultItems

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialResultItems/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialResultItems",
    "attributes" : {
      "calculatedQuality" : 1.0,
      "intensity" : null,
      "quality" : null
    },
    "relationships" : {
      "sensorialDescriptors" : {
        "data" : [ {
          "type" : "sensorialDescriptors",
          "id" : "AAAA"
        }, {
          "type" : "sensorialDescriptors",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialDescriptors",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialDescriptors"
        }
      },
      "sensorialResult" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialResults"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialResult",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialResult"
        }
      },
      "sensorialSheetItem" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheetItems"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialSheetItem",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialSheetItem"
        }
      }
    }
  } ]
}
GET Get a specific sensorialResultItem

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialResultItems/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialResultItems",
    "attributes" : {
      "calculatedQuality" : 1.0,
      "intensity" : null,
      "quality" : null
    },
    "relationships" : {
      "sensorialDescriptors" : {
        "data" : [ {
          "type" : "sensorialDescriptors",
          "id" : "AAAA"
        }, {
          "type" : "sensorialDescriptors",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialDescriptors",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialDescriptors"
        }
      },
      "sensorialResult" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialResults"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialResult",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialResult"
        }
      },
      "sensorialSheetItem" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheetItems"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialSheetItem",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialSheetItem"
        }
      }
    }
  }
}
PATCH Update an existing sensorialResultItem

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"sensorialResultItems","attributes":{"intensity":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/sensorialResultItems/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialResultItems",
    "attributes" : {
      "calculatedQuality" : 1.0,
      "intensity" : <UPDATED_VALUE>,
      "quality" : null
    },
    "relationships" : {
      "sensorialDescriptors" : {
        "data" : [ {
          "type" : "sensorialDescriptors",
          "id" : "AAAA"
        }, {
          "type" : "sensorialDescriptors",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialDescriptors",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialDescriptors"
        }
      },
      "sensorialResult" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialResults"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialResult",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialResult"
        }
      },
      "sensorialSheetItem" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheetItems"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialSheetItem",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialSheetItem"
        }
      }
    }
  }
}
POST Create a sensorialResultItem

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "sensorialResultItems", "attributes" : { }, "relationships" : { "sensorialResult" : { "data" : { "id" : "AAAA", "type" : "sensorialResults" } }, "sensorialSheetItem" : { "data" : { "id" : "AAAA", "type" : "sensorialSheetItems" } } } }}'
     'https://c-sar.cropster.com/api/v2/sensorialResultItems'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialResultItems",
    "attributes" : {
      "calculatedQuality" : 1.0,
      "intensity" : null,
      "quality" : null
    },
    "relationships" : {
      "sensorialDescriptors" : {
        "data" : [ {
          "type" : "sensorialDescriptors",
          "id" : "AAAA"
        }, {
          "type" : "sensorialDescriptors",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialDescriptors",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialDescriptors"
        }
      },
      "sensorialResult" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialResults"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialResult",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialResult"
        }
      },
      "sensorialSheetItem" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheetItems"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/relationships/sensorialSheetItem",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResultItems/id/sensorialSheetItem"
        }
      }
    }
  }
}

Sensorial Results

Type name: sensorialResults

Each QC has zero or more sensorial results. A result contains data based on a specific evaluator. A QC’s final score will be calculated from all the QC’s results.

Attributes

Name Type Constraints Notes

calculatedScore

float

-

-

evaluationDate

dateTime

-

-

evaluator

string

required

Per cupper, only one cupping result may exist.

evaluatorScore

float

-

-

finalScore

float

read only

-

isTakenIntoAccount

boolean

-

-

notes

string

-

-

roastLevel

float

-

-

Relationships

Name Constraints Notes

lot

read only

Cannot change the lot on a sensorial result, as the lot belongs to the sensorial Qc.

sensorialQc

required
init only

-

sensorialResultItems

-

-

sensorialSession

read only

-

sensorialSheet

required

-

DELETE Delete a specific sensorialResult

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialResults/<ID>'

Response body

N/A
GET Get multiple specific sensorialResults

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialResults/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialResults",
    "attributes" : {
      "calculatedScore" : null,
      "evaluationDate" : null,
      "evaluator" : "evaluator",
      "evaluatorScore" : null,
      "finalScore" : 1.0,
      "isTakenIntoAccount" : null,
      "notes" : null,
      "roastLevel" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/lot"
        }
      },
      "sensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialQc"
        }
      },
      "sensorialResultItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialResultItems",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialResultItems"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialSheet"
        }
      }
    }
  } ]
}
GET Get a specific sensorialResult

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialResults/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialResults",
    "attributes" : {
      "calculatedScore" : null,
      "evaluationDate" : null,
      "evaluator" : "evaluator",
      "evaluatorScore" : null,
      "finalScore" : 1.0,
      "isTakenIntoAccount" : null,
      "notes" : null,
      "roastLevel" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/lot"
        }
      },
      "sensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialQc"
        }
      },
      "sensorialResultItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialResultItems",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialResultItems"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialSheet"
        }
      }
    }
  }
}
PATCH Update an existing sensorialResult

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"sensorialResults","attributes":{"calculatedScore":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/sensorialResults/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialResults",
    "attributes" : {
      "calculatedScore" : <UPDATED_VALUE>,
      "evaluationDate" : null,
      "evaluator" : "evaluator",
      "evaluatorScore" : null,
      "finalScore" : 1.0,
      "isTakenIntoAccount" : null,
      "notes" : null,
      "roastLevel" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/lot"
        }
      },
      "sensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialQc"
        }
      },
      "sensorialResultItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialResultItems",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialResultItems"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialSheet"
        }
      }
    }
  }
}
POST Create a sensorialResult

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "sensorialResults", "attributes" : { "evaluator" : "evaluator" }, "relationships" : { "sensorialQc" : { "data" : { "id" : "AAAA", "type" : "sensorialQcs" } }, "sensorialSheet" : { "data" : { "id" : "AAAA", "type" : "sensorialSheets" } } } }}'
     'https://c-sar.cropster.com/api/v2/sensorialResults'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialResults",
    "attributes" : {
      "calculatedScore" : null,
      "evaluationDate" : null,
      "evaluator" : "evaluator",
      "evaluatorScore" : null,
      "finalScore" : 1.0,
      "isTakenIntoAccount" : null,
      "notes" : null,
      "roastLevel" : null
    },
    "relationships" : {
      "lot" : {
        "data" : {
          "id" : "AAAA",
          "type" : "lots"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/lot",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/lot"
        }
      },
      "sensorialQc" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialQcs"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialQc",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialQc"
        }
      },
      "sensorialResultItems" : {
        "data" : [ ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialResultItems",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialResultItems"
        }
      },
      "sensorialSession" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSessions"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialSession",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialSession"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialResults/id/sensorialSheet"
        }
      }
    }
  }
}

Sensorial Sessions

Type name: sensorialSesions

A sensorial session is a particular analysis event that happened or will happen at a specific time in the future. Each session has multiple sensorial QCs that represent the samples being analyzed in the session. Furthermore, each QC contains the actual sensorial results from the evaluators.

A session can be in one of three session states: CREATED, OPEN, and CLOSED.

  • In the CREATED state the session is editable but not yet accepting results.

  • In the OPEN state, details about the session cannot be edited, but it is accepting results from evaluators.

  • In the CLOSED state, the session is closed and no further results will be accepted.

A session can use one of three analysis code types:

  • ALPHABETICAL - A, B, C, etc.

  • NUMERICAL - 1, 2, 3, etc.

  • THREE_LETTER - Random three letter strings, RTZ, HYX, etc.

Attributes

Name Type Constraints Notes

idTag

string

read only

-

name

string

-

-

codeType

analysisCodeType

-

-

codes

string[]

read only

-

evaluators

string[]

read only

-

isActive

boolean

read only

Only the DELETE request can set this to false.

isBlind

boolean

-

-

lab

string

-

-

scheduleDate

dateTime

-

Cannot be null.

sensorialQcCount

long

read only

-

sensorialQcOrder

string[]

-

-

state

sessionState

-

-

Relationships

Name Constraints Notes

group

required
init only

-

sensorialQcs

read only

-

sensorialSheet

required

-

DELETE Delete a specific sensorialSession

Request

curl --request DELETE
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialSessions/<ID>'

Response body

N/A
GET Get multiple specific sensorialSessions

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialSessions/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialSessions",
    "attributes" : {
      "idTag" : "idTag",
      "name" : null,
      "codeType" : null,
      "codes" : [ "codes" ],
      "evaluators" : [ "evaluators" ],
      "isActive" : true,
      "isBlind" : null,
      "lab" : null,
      "scheduleDate" : null,
      "sensorialQcCount" : 1.0,
      "sensorialQcOrder" : [ ],
      "state" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/group"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialQcs"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialSheet"
        }
      }
    }
  } ]
}
GET Get a specific sensorialSession

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialSessions/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialSessions",
    "attributes" : {
      "idTag" : "idTag",
      "name" : null,
      "codeType" : null,
      "codes" : [ "codes" ],
      "evaluators" : [ "evaluators" ],
      "isActive" : true,
      "isBlind" : null,
      "lab" : null,
      "scheduleDate" : null,
      "sensorialQcCount" : 1.0,
      "sensorialQcOrder" : [ ],
      "state" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/group"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialQcs"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialSheet"
        }
      }
    }
  }
}
GET List all sensorialSessions

Filter Parameters

Name Type Constraints Notes

filter[sensorialSessions][group]

string

-

-

filter[sensorialSessions][idTag]

string

-

-

filter[sensorialSessions][name]

string

-

-

filter[sensorialSessions][searchTerm]

string

-

-

filter[sensorialSessions][scheduleDate.from]

dateTime

-

-

filter[sensorialSessions][scheduleDate.to]

dateTime

-

-

filter[sensorialSessions][state]

sessionState

-

Repeatable, objects must match at least one.

filter[sensorialSessions][sensorialSheet]

string

-

Repeatable, objects must match at least one.

filter[sensorialSessions][sensorialSheet.name]

string

-

Repeatable, objects must match at least one.

filter[sensorialSessions][lab]

string

-

Repeatable, objects must match at least one.

filter[sensorialSessions][sensorialQcs.sensorialResults.evaluator]

string

-

Repeatable, objects must match at least one.

filter[sensorialSessions][sensorialQcs.lot]

string

-

Repeatable, objects must match at least one.

filter[sensorialSessions][sensorialQcs.lot.name]

string

-

Repeatable, objects must match at least one.

filter[sensorialSessions][sensorialQcs.lot.idTag]

string

-

Repeatable, objects must match at least one.

filter[sensorialSessions][sensorialQcs.lot.searchTerm]

string

-

-

filter[sensorialSessions][sensorialQcs.lot.sampleType]

sampleType

-

Repeatable, objects must match at least one.

Sort Parameters

Name Value

sort[sensorialSessions][id]

asc/desc

sort[sensorialSessions][idTag]

asc/desc

sort[sensorialSessions][name]

asc/desc

sort[sensorialSessions][scheduleDate]

asc/desc

sort[sensorialSessions][lab]

asc/desc

sort[sensorialSessions][state]

asc/desc

sort[sensorialSessions][sensorialSheet.name]

asc/desc

sort[sensorialSessions][sensorialQcs.length]

asc/desc

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/sensorialSessions?filter[sensorialSessions][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialSessions",
    "attributes" : {
      "idTag" : "idTag",
      "name" : null,
      "codeType" : null,
      "codes" : [ "codes" ],
      "evaluators" : [ "evaluators" ],
      "isActive" : true,
      "isBlind" : null,
      "lab" : null,
      "scheduleDate" : null,
      "sensorialQcCount" : 1.0,
      "sensorialQcOrder" : [ ],
      "state" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/group"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialQcs"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialSheet"
        }
      }
    }
  } ]
}
PATCH Update an existing sensorialSession

Request

curl --request PATCH
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{"data":{"id":"AAAA","type":"sensorialSessions","attributes":{"name":<UPDATED_VALUE>}}}'
     'https://c-sar.cropster.com/api/v2/sensorialSessions/<ID>'

Response Body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialSessions",
    "attributes" : {
      "idTag" : "idTag",
      "name" : <UPDATED_VALUE>,
      "codeType" : null,
      "codes" : [ "codes" ],
      "evaluators" : [ "evaluators" ],
      "isActive" : true,
      "isBlind" : null,
      "lab" : null,
      "scheduleDate" : null,
      "sensorialQcCount" : 1.0,
      "sensorialQcOrder" : [ ],
      "state" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/group"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialQcs"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialSheet"
        }
      }
    }
  }
}
POST Create a sensorialSession

Request

curl --request POST
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     --data '{ "data" : { "type" : "sensorialSessions", "attributes" : { }, "relationships" : { "group" : { "data" : { "id" : "AAAA", "type" : "groups" } }, "sensorialSheet" : { "data" : { "id" : "AAAA", "type" : "sensorialSheets" } } } }}'
     'https://c-sar.cropster.com/api/v2/sensorialSessions'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialSessions",
    "attributes" : {
      "idTag" : "idTag",
      "name" : null,
      "codeType" : null,
      "codes" : [ "codes" ],
      "evaluators" : [ "evaluators" ],
      "isActive" : true,
      "isBlind" : null,
      "lab" : null,
      "scheduleDate" : null,
      "sensorialQcCount" : 1.0,
      "sensorialQcOrder" : [ ],
      "state" : null
    },
    "relationships" : {
      "group" : {
        "data" : {
          "id" : "AAAA",
          "type" : "groups"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/group",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/group"
        }
      },
      "sensorialQcs" : {
        "data" : [ {
          "type" : "sensorialQcs",
          "id" : "AAAA"
        }, {
          "type" : "sensorialQcs",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialQcs",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialQcs"
        }
      },
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSessions/id/sensorialSheet"
        }
      }
    }
  }
}

Sensorial Sheet Items

Type name: sensorialSheetItems

A sensorial sheet has multiple sheet items (or categories), e.g. Sweetness, Aroma etc. Every evaluator may give scores for each item.

Attributes

Name Type Constraints Notes

name

string

read only

-

allowedFlavors

string[]

read only

-

formula

string

read only

-

grouping

string

read only

-

hasDescriptors

boolean

read only

-

hasIntensity

boolean

read only

-

hasQuality

boolean

read only

-

inputType

itemInputType

read only

-

intensityMax

integer

read only

-

intensityMin

integer

read only

-

intensityStep

float

read only

-

isGeneralDescriptorsItem

boolean

read only

-

note

string

read only

-

position

integer

read only

-

qualityMax

integer

read only

-

qualityMin

integer

read only

-

qualityStep

float

read only

-

Relationships

Name Constraints Notes

sensorialSheet

read only

-

GET Get multiple specific sensorialSheetItems

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialSheetItems/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialSheetItems",
    "attributes" : {
      "name" : "name",
      "allowedFlavors" : [ "allowedFlavors" ],
      "formula" : "formula",
      "grouping" : "grouping",
      "hasDescriptors" : true,
      "hasIntensity" : true,
      "hasQuality" : true,
      "inputType" : "DROPDOWN",
      "intensityMax" : 1,
      "intensityMin" : 1,
      "intensityStep" : 1.0,
      "isGeneralDescriptorsItem" : true,
      "note" : "note",
      "position" : 1,
      "qualityMax" : 1,
      "qualityMin" : 1,
      "qualityStep" : 1.0
    },
    "relationships" : {
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSheetItems/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSheetItems/id/sensorialSheet"
        }
      }
    }
  } ]
}
GET Get a specific sensorialSheetItem

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialSheetItems/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialSheetItems",
    "attributes" : {
      "name" : "name",
      "allowedFlavors" : [ "allowedFlavors" ],
      "formula" : "formula",
      "grouping" : "grouping",
      "hasDescriptors" : true,
      "hasIntensity" : true,
      "hasQuality" : true,
      "inputType" : "DROPDOWN",
      "intensityMax" : 1,
      "intensityMin" : 1,
      "intensityStep" : 1.0,
      "isGeneralDescriptorsItem" : true,
      "note" : "note",
      "position" : 1,
      "qualityMax" : 1,
      "qualityMin" : 1,
      "qualityStep" : 1.0
    },
    "relationships" : {
      "sensorialSheet" : {
        "data" : {
          "id" : "AAAA",
          "type" : "sensorialSheets"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSheetItems/id/relationships/sensorialSheet",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSheetItems/id/sensorialSheet"
        }
      }
    }
  }
}

Sensorial Sheets

Type name: sensorialSheets

A sensorial sheet is specified with several sheet items (or categories), e.g. Sweetness, Aroma etc. Every evaluator may give scores for each item.

Attributes

Name Type Constraints Notes

name

string

read only

-

acronym

string

read only

-

deltaScore

float

read only

-

hasRoastLevels

boolean

read only

-

isActive

boolean

read only

-

isEvaluatorScoreAllowed

boolean

read only

-

isGlobal

boolean

read only

-

roastLevelsMax

integer

read only

-

roastLevelsMin

integer

read only

-

roastLevelsStep

float

read only

-

scoreMaximum

float

read only

-

scoreMinimum

float

read only

-

Relationships

Name Constraints Notes

productType

read only

-

sensorialSheetItems

read only

-

GET Get multiple specific sensorialSheets

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialSheets/<IDs>'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialSheets",
    "attributes" : {
      "name" : "name",
      "acronym" : "acronym",
      "deltaScore" : 1.0,
      "hasRoastLevels" : true,
      "isActive" : true,
      "isEvaluatorScoreAllowed" : true,
      "isGlobal" : true,
      "roastLevelsMax" : 1,
      "roastLevelsMin" : 1,
      "roastLevelsStep" : 1.0,
      "scoreMaximum" : 1.0,
      "scoreMinimum" : 1.0
    },
    "relationships" : {
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/productType"
        }
      },
      "sensorialSheetItems" : {
        "data" : [ {
          "type" : "sensorialSheetItems",
          "id" : "AAAA"
        }, {
          "type" : "sensorialSheetItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/relationships/sensorialSheetItems",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/sensorialSheetItems"
        }
      }
    }
  } ]
}
GET Get a specific sensorialSheet

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
     'https://c-sar.cropster.com/api/v2/sensorialSheets/<ID>'

Response body

{
  "data" : {
    "id" : "id",
    "type" : "sensorialSheets",
    "attributes" : {
      "name" : "name",
      "acronym" : "acronym",
      "deltaScore" : 1.0,
      "hasRoastLevels" : true,
      "isActive" : true,
      "isEvaluatorScoreAllowed" : true,
      "isGlobal" : true,
      "roastLevelsMax" : 1,
      "roastLevelsMin" : 1,
      "roastLevelsStep" : 1.0,
      "scoreMaximum" : 1.0,
      "scoreMinimum" : 1.0
    },
    "relationships" : {
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/productType"
        }
      },
      "sensorialSheetItems" : {
        "data" : [ {
          "type" : "sensorialSheetItems",
          "id" : "AAAA"
        }, {
          "type" : "sensorialSheetItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/relationships/sensorialSheetItems",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/sensorialSheetItems"
        }
      }
    }
  }
}
GET List all sensorialSheets

Filter Parameters

Name Type Constraints Notes

filter[sensorialSheets][group]

string

-

-

Sort Parameters

There are no sort parameters for these filters.

Request

curl --request GET
     --header 'Authorization: Basic <USER_AUTHORIZATION>'
     --header 'Content-Type: application/vnd.api+json; charset=utf-8'
     --header 'User-agent: <USER_AGENT>'
          'https://c-sar.cropster.com/api/v2/sensorialSheets?filter[sensorialSheets][group]=<FILTER_VALUE>&page[size]=25&page[number]=0'

Response body

{
  "data" : [ {
    "id" : "id",
    "type" : "sensorialSheets",
    "attributes" : {
      "name" : "name",
      "acronym" : "acronym",
      "deltaScore" : 1.0,
      "hasRoastLevels" : true,
      "isActive" : true,
      "isEvaluatorScoreAllowed" : true,
      "isGlobal" : true,
      "roastLevelsMax" : 1,
      "roastLevelsMin" : 1,
      "roastLevelsStep" : 1.0,
      "scoreMaximum" : 1.0,
      "scoreMinimum" : 1.0
    },
    "relationships" : {
      "productType" : {
        "data" : {
          "id" : "AAAA",
          "type" : "productTypes"
        },
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/relationships/productType",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/productType"
        }
      },
      "sensorialSheetItems" : {
        "data" : [ {
          "type" : "sensorialSheetItems",
          "id" : "AAAA"
        }, {
          "type" : "sensorialSheetItems",
          "id" : "BBBB"
        } ],
        "links" : {
          "self" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/relationships/sensorialSheetItems",
          "related" : "https://c-sar.cropster.com/api/v2/sensorialSheets/id/sensorialSheetItems"
        }
      }
    }
  } ]
}

Appendix

This section contains all of the enums and descriptions of special types relevant for the API objects and endpoints.

Enums

AccountStatus

  • SETUP

  • TRIAL

  • PRODUCTION

  • LOST

  • INACTIVE_SETUP

  • LOST_SETUP

  • LOST_TRIAL

  • UPSELL_TRIAL

  • DIRTY

  • HOLD

  • HOLD_TRIAL

  • PAST_DUE

Action

  • DELETE

  • RECREATE

AggregationDate

  • RECEPTION

  • STORAGE

  • MILLING

AggregationFunction

  • SUM

  • AVG

  • MAX

  • MIN

AnalysisCodeType

  • ALPHABETICAL

  • NUMERICAL

  • THREE_LETTER

BillingDomain

  • INC

  • GMBH

BrewType

  • TEST

  • PAST_REFERENCE

  • CURRENT_REFERENCE

  • UNSET

BrewingDevice

  • AEROPRESS

  • V60

  • KALITA_WAVE

  • POUR_OVER

  • SYPHON

  • CHEMEX

  • CLEVER

  • FRENCH_PRESS

BrewingMethod

  • ESPRESSO

  • BATCH_BREW

  • MANUAL_BREW

  • COLD_BREW

Category

  • FERMENTATION

  • DEFECT

  • OTHER

ClimateValueType

  • TEMPERATURE

  • HUMIDITY

CoffeeForm

  • CHERRY

  • DRY_CHERRY

  • WET_PARCHMENT

  • PARCHMENT

  • WET_GREEN

  • RAW_GREEN

  • GREEN

Country

  • AD

  • AE

  • AF

  • AG

  • AI

  • AL

  • AM

  • AO

  • AQ

  • AR

  • AS

  • AT

  • AU

  • AW

  • AX

  • AZ

  • BA

  • BB

  • BD

  • BE

  • BF

  • BG

  • BH

  • BI

  • BJ

  • BL

  • BM

  • BN

  • BO

  • BQ

  • BR

  • BS

  • BT

  • BV

  • BW

  • BY

  • BZ

  • CA

  • CC

  • CD

  • CF

  • CG

  • CH

  • CI

  • CK

  • CL

  • CM

  • CN

  • CO

  • CR

  • CU

  • CV

  • CW

  • CX

  • CY

  • CZ

  • DE

  • DJ

  • DK

  • DM

  • DO

  • DZ

  • EC

  • EE

  • EG

  • EH

  • ER

  • ES

  • ET

  • FI

  • FJ

  • FK

  • FM

  • FO

  • FR

  • GA

  • GB

  • GD

  • GE

  • GF

  • GG

  • GH

  • GI

  • GL

  • GM

  • GN

  • GP

  • GQ

  • GR

  • GS

  • GT

  • GU

  • GW

  • GY

  • HK

  • HM

  • HN

  • HR

  • HT

  • HU

  • ID

  • IE

  • IL

  • IM

  • IN

  • IO

  • IQ

  • IR

  • IS

  • IT

  • JE

  • JM

  • JO

  • JP

  • KE

  • KG

  • KH

  • KI

  • KM

  • KN

  • KP

  • KR

  • KW

  • KY

  • KZ

  • LA

  • LB

  • LC

  • LI

  • LK

  • LR

  • LS

  • LT

  • LU

  • LV

  • LY

  • MA

  • MC

  • MD

  • ME

  • MF

  • MG

  • MH

  • MK

  • ML

  • MM

  • MN

  • MO

  • MP

  • MQ

  • MR

  • MS

  • MT

  • MU

  • MV

  • MW

  • MX

  • MY

  • MZ

  • NA

  • NC

  • NE

  • NF

  • NG

  • NI

  • NL

  • NO

  • NP

  • NR

  • NU

  • NZ

  • OM

  • PA

  • PE

  • PF

  • PG

  • PH

  • PK

  • PL

  • PM

  • PN

  • PR

  • PS

  • PT

  • PW

  • PY

  • QA

  • RE

  • RO

  • RS

  • RU

  • RW

  • SA

  • SB

  • SC

  • SD

  • SE

  • SG

  • SH

  • SI

  • SJ

  • SK

  • SL

  • SM

  • SN

  • SO

  • SR

  • SS

  • ST

  • SV

  • SX

  • SY

  • SZ

  • TC

  • TD

  • TF

  • TG

  • TH

  • TJ

  • TK

  • TL

  • TM

  • TN

  • TO

  • TR

  • TT

  • TV

  • TW

  • TZ

  • UA

  • UG

  • UM

  • US

  • UY

  • UZ

  • VA

  • VC

  • VE

  • VG

  • VI

  • VN

  • VU

  • WF

  • WS

  • YE

  • YT

  • ZA

  • ZM

  • ZW

CropsterProduct

  • CROPSTER_CUP

  • CROPSTER_CORE

  • CROPSTER_HUB

CustomerType

  • WHOLESALE

  • RETAIL

DocumentType

  • PDF

  • EXCEL

EmailSubscriptionType

  • AMBIENT_SENSOR_ALERTS

  • DAILY_PRODUCTION_UPDATE

  • BILLING_UPDATES

  • GROUP_OWNER_UPDATES

  • ROAST_UPDATES

  • BARISTA_UPDATES

  • CAFE_GROUP_ADMIN_UPDATES

  • CAFE_MANAGER_UPDATES

EquipmentBrand

  • OTHER

  • ACAIA

  • ANFIM

  • ASTORIA

  • BARATZA

  • BREVILLE

  • BREWISTA

  • BRITA

  • BUNN

  • BWT

  • CARIMALI

  • CHEMEX

  • CLEVER

  • COMPAK

  • CONTI

  • CURTIS

  • DALLA_CORTE

  • DECENT_ESPRESSO

  • DITTING

  • ELEKTRA

  • ETZINGER

  • EUREKA

  • EVERPURE

  • EVERSYS

  • FAEMA

  • FETCO

  • HARIO

  • IBERITAL

  • KALITTA

  • KEES_VAN_DER_WESTEN

  • LA_CIMBALI

  • LA_MARZOCCO

  • LA_SAN_MARCO

  • LA_SPAZIALE

  • MAHLKOENIG

  • MARCO

  • MAVAM

  • MAZZER

  • MODBAR

  • NUOVA_SIMONELLI

  • POURSTEADY

  • PUQPRESS

  • UNIC

  • RANCILIO

  • ROCKET

  • SAGE

  • SANREMO

  • SLAYER

  • SLINGSHOT

  • SYNESSO

  • THREE_M

  • THREE_TEMP

  • TONE

  • VICTORIA_ARDUINO

  • WEGA

  • WILFA

EquipmentType

  • ESPRESSO_MACHINE

  • GRINDER

  • WATER_BOILER

  • BATCH_BREWER

  • WATER_FILTRATION

  • SCALE

  • OTHER

ExternalOrderStatus

  • OPEN

  • CANCELLED

  • CLOSED

Format

  • WHOLE_BEAN

  • GROUND

GoalType

  • RELATIVE

  • ABSOLUTE

GroupStatus

  • ACTIVE

  • PAST_DUE

  • HOLD

  • LOST

InvoiceStatus

  • OPEN

  • PAID

  • DRAFT

  • CANCELLED

ItemInputType

  • DROPDOWN

  • TEXT

  • POPUP_SLIDER

  • POPUP_SLIDER_SMALL

  • SLIDER

  • SLIDER_BLIND

  • BUTTONS

  • TOGGLE_BUTTONS

  • DEFECTS

LotAcceptanceType

  • accepted

  • declined

  • notRated

MachineType

  • P100Mex_GENERIC

  • AMBEX_GENERIC

  • AMBEX_YM2

  • AMBEX_YM10

  • AMBEX_YM30

  • ARC_ROASTER

  • ATILLA_GENERIC

  • ATILLA_STANDARD

  • ATILLA_GOLD

  • ATILLA_GOLDPLUS

  • BELLATW_GENERIC

  • BELLATW_MINI500

  • BELLATW_XJ101S

  • BELLATW_EVOI

  • BELLATW_EVOIV

  • BELLATW_810N

  • BESCA_GENERIC

  • BERTO_GENERIC

  • BLUEKING_GENERIC

  • BUCKEYE_GENERIC

  • BUHLER_GENERIC

  • BUHLER_ROASTMASTER20

  • BUHLER_ROASTMASTER60

  • BUHLER_ROASTMASTER120

  • BRAMBATI_GENERIC

  • CARMOMAQ_GENERIC

  • COFFED_GENERIC

  • COFFEEPRODIRECT_GENERIC

  • COFFEEPRODIRECT_SAMPLEPRO100

  • COFFEEPRODIRECT_CRAFTMASTER2

  • COFFEEPRODIRECT_CRAFTMASTER5

  • COFFEEPRODIRECT_CRAFTMASTER6

  • COFFEEPRODIRECT_CRAFTMASTER12

  • COFFEEPRODIRECT_CRAFTMASTER30

  • COFFEETECH_GENERIC

  • COFFEETECH_GHIBLIFIREWOOD

  • COFFEETECH_GHIBLIR15

  • COFFEETECH_GHIBLIR45

  • COFFEETECH_GHIBLIR90

  • COFFEETECH_SOLAR

  • COFFEETECH_FZ94

  • COFFEETOOL_GENERIC

  • DIEDRICH_GENERIC

  • DIEDRICH_HR1

  • DIEDRICH_CR20

  • DIEDRICH_CR25

  • DIEDRICH_CR40

  • DIEDRICH_CR35

  • DIEDRICH_CR45

  • DIEDRICH_CR50

  • DIEDRICH_CR60

  • DIEDRICH_CR70

  • DIEDRICH_CR80

  • DIEDRICH_CR120

  • DIEDRICH_CR240

  • DIEDRICH_IR1

  • DIEDRICH_IR2P5

  • DIEDRICH_IR3

  • DIEDRICH_IR5

  • DIEDRICH_IR7

  • DIEDRICH_IR12

  • DIEDRICH_IR24

  • DISCAF_GENERIC

  • DONGYI_GENERIC

  • EASYSTER_GENERIC

  • FROCO_GENERIC

  • FUJIROYAL_GENERIC

  • FUJIROYAL_DISCOVERY

  • FUJIROYAL_R101

  • FUJIROYAL_R103

  • FUJIROYAL_R105

  • FUJIROYAL_R110

  • GARANTI_GENERIC

  • GARANTI_SAMPLE

  • GENIO_GENERIC

  • GENIO_6

  • GENIO_15

  • GENIO_30

  • GIESEN_GENERIC

  • GIESEN_WPGE1

  • GIESEN_W1

  • GIESEN_W6

  • GIESEN_W12

  • GIESEN_W15

  • GIESEN_W25

  • GIESEN_W30

  • GIESEN_W45

  • GIESEN_W60

  • GOLDENCOFFEEROASTERS_GENERIC

  • GOTHOT_GENERIC

  • GOTHOT_SAMPLE

  • GOTHOT_6

  • GOTHOT_23

  • GOTHOT_35

  • GOTHOT_40

  • GOTHOT_90

  • GOTHOT_120

  • HASGARANTI_GENERIC

  • HBROASTER_GENERIC

  • HUKY_GENERIC

  • HOTTOP_GENERIC

  • IKAWA_GENERIC

  • IMF_GENERIC

  • IPXENAKIS_GENERIC

  • JOPER_GENERIC

  • JOPER_SAMPLE

  • KAPOK_GENERIC

  • KIRSCHUNDMAUSSER_GENERIC

  • KIRSCHUNDMAUSSER_UG22

  • KUBAN_GENERIC

  • LILLA_GENERIC

  • LORING_GENERIC

  • LORING_L1

  • LORING_S7NIGHTHAWK

  • LORING_A15MERLIN

  • LORING_S15FALCON

  • LORING_S35KESTREL

  • LORING_S70PEREGRINE

  • LYSANDER_GENERIC

  • MAGRA_GENERIC

  • MARSHALLFOWLER_GENERIC

  • MILLCITY_GENERIC

  • NEUHAUSNEOTEC_GENERIC

  • NORTHCOFFEEEQUIPMENT_GENERIC

  • NOVOROASTER_GENERIC

  • NOVUSTEC_GENERIC

  • NOVUSTEC_TRINITAST2

  • OPP_GENERIC

  • OTTOSWADLO_GENERIC

  • OZTURK

  • OZTURK_OKS250GRELEKTRIKLI

  • OZTURK_OKS250GR

  • OZTURK_OKS500GR

  • OZTURK_OKS1P5

  • OZTURK_OKS2P5

  • OZTURK_OKS5

  • OZTURK_OKS10

  • OZTURK_OKS15

  • OZTURK_OKS30

  • OZTURK_OKS60

  • OZTURK_OKS120

  • OZTURK_OKS180

  • OZTURK_OKS240

  • OZTURK_OKS360

  • PETRONCINI_GENERIC

  • PHOENIX_GENERIC

  • PHOENIXORO_GENERIC

  • PRIMO_GENERIC

  • PROASTER_GENERIC

  • PROASTER_THCR005

  • PROASTER_THCR01

  • PROASTER_THCR06

  • PROASTER_THCR12

  • PROASTER_THCR25

  • PROBAT_GENERIC

  • PROBAT_BRZ

  • PROBAT_G25

  • PROBAT_G45

  • PROBAT_G60

  • PROBAT_G90

  • PROBAT_G120

  • PROBAT_GG45

  • PROBAT_GG60

  • PROBAT_GG75

  • PROBAT_GG90

  • PROBAT_GN12

  • PROBAT_L5

  • PROBAT_L12

  • PROBAT_L25

  • PROBAT_L50

  • PROBAT_PROBATINO

  • PROBAT_PROBATONE5

  • PROBAT_PROBATONE12

  • PROBAT_PROBATONE25

  • PROBAT_PROBATONE50

  • PROBAT_PROBATONE60

  • PROBAT_UG12

  • PROBAT_UG15

  • PROBAT_UG22

  • PROBAT_UG25

  • PROBAT_UG45

  • PROBAT_UG90

  • PROBAT_PIII

  • PROBAT_PIII_SAMPLE

  • QUANTIK_GENERIC

  • QUEST_GENERIC

  • RASCOMAC

  • RENEGADE_GENERIC

  • ROASTMAX_GENERIC

  • SAMIAC_GENERIC

  • SANTOKER_GENERIC

  • SANFRANCISCAN_GENERIC

  • SANFRANCISCAN_SF1

  • SANFRANCISCAN_SF3

  • SANFRANCISCAN_SF6

  • SANFRANCISCAN_SF25

  • SANFRANCISCAN_SF45

  • SANFRANCISCAN_SF75

  • SANFRANCISCAN_SF150

  • SANFRANCISCAN_SF300

  • SEDONA_GENERIC

  • SEDONA_ELITE

  • SIVETZ_GENERIC

  • SONOFRESCO_GENERIC

  • STA_IMPIANTI_GENERIC

  • TECAIRE_GENERIC

  • TITANIUM_GENERIC

  • TOPER_GENERIC

  • TOPER_CAFEMINO

  • TOPER_TKMX5

  • TOPER_TKMX10

  • TOPER_TKMX15

  • TOPER_TKMSX3

  • TOPER_TKMSX5

  • TOPER_TKMSX10

  • TOPER_TKMSX15

  • TOPER_TKMSX20

  • TOPER_TKMX30

  • TOPER_TKMX60

  • TOPER_TKMX120

  • TOPER_TKMX180

  • TOPER_TKMX240

  • TOPER_TKMSX30

  • TOPER_TKMSX60

  • TOPER_TKMSX120

  • TOPER_TKMSX180

  • TOPER_TKMSX240

  • TROBRAT_GENERIC

  • TROBRAT_5

  • TROBRAT_20

  • TROBRAT_60

  • TYPHOON_GENERIC

  • UNCLEJOHN_GENERIC

  • USROASTERCORP_GENERIC

  • VIERYGARNIERSOMATAL_GENERIC

  • VITTORIA_GENERIC

  • VNT_GENERIC

  • VORTECS_GENERIC

  • WINTOP_GENERIC

  • WOOTS_GENERIC

  • YOSHAN_GENERIC

  • ZARA_GENERIC

MeasurementType

  • WEIGHT

  • COUNT

  • UNKNOWN

PaymentMethodType

  • CREDIT_CARD

  • SEPA

  • ACH

PermissionEnum

  • CONTACT_EDIT

  • CONTACT_SHOW

  • EXTERNAL_SHOPS_EDIT

  • EXTERNAL_SHOPS_SHOW

  • GROUP_USER_EDIT

  • GROUP_QUALITY_CUPPING_EDIT

  • GROUP_QUALITY_EDIT

  • GROUP_QUALITY_PHY_EDIT

  • GROUP_QUALITY_PHY_VIEW

  • GROUP_QUALITY_SHOW

  • GROUP_USER_SHOW

  • GROUP_BILLING_EDIT

  • LOT_CONTAINER_EDIT

  • LOT_CONTAINER_SHOW

  • LOCATION_EDIT

  • LOT_EDIT

  • LOT_SHOW

  • LOT_INCOMING_EDIT

  • LOT_INCOMING_SHOW

  • LOT_ORDER_EDIT

  • LOT_ORDER_SHOW

  • LOT_SHARING_EDIT

  • LOT_SHARING_SHOW

  • LOT_INVENTORY_SHOW

  • LOT_INVENTORY_EDIT

  • LOT_SAMPLE_SHOW

  • LOT_SAMPLE_EDIT

  • LOT_PRICE_SHOW

  • LOT_PRICE_EDIT

  • ORDER_EDIT

  • ORDER_SHOW

  • PROCESSING_EDIT

  • PROCESSING_SHOW

  • REPORT_SHOW

  • ROASTED_COMPONENT_EDIT

  • ROASTED_COMPONENT_SHOW

  • AMBIENT_SENSOR_SHOW

  • AMBIENT_SENSOR_EDIT

  • ORIGIN

  • ORIGIN_ADMINISTRATION

  • ORIGIN_MEASUREMENTS

  • ROAST_EDIT

  • ROAST_SHOW

  • ROAST_GOAL_EDIT

  • ROAST_SCHEDULING

  • HAS_CUP

  • GLOBAL_ADMINISTRATION

  • CREATE_ACCOUNT

  • GROUP_ADMINISTRATION

  • CAFE_RECIPE_SHOW

  • CAFE_RECIPE_EDIT

  • CAFE_BREW_SHOW

  • CAFE_BREW_EDIT

  • CAFE_TASK_SHOW

  • CAFE_TASK_EDIT

  • CAFE_LINK_ROAST

  • FABSCALE_EDIT

  • GROUP_START

  • LAB_EXTENDED_SESSION

  • LOT_SHARING_NOTIFICATION

  • MY_SETTINGS

  • RECEIVE_NOTIFICATION

  • SALES_AGENT_VIEW

  • START_PAGE

PhyColor

  • blueGreen

  • blueishGreen

  • green

  • greenish

  • yellowGreen

  • paleYellow

  • yellowish

  • brownish

PhyColorUniformity

  • uniform

  • inconsistent

  • mottledBeans

PhySmell

  • clean

  • foreign

ProcessingMethod

  • NATURAL

  • FULLY_WASHED

  • SEMI_WASHED

  • PULPED_NATURAL

  • HONEY

  • WET_HULLED

  • MISC

  • OTHER

ProductFamily

  • ROAST

  • LAB

  • CAFE

  • ORIGIN

  • ADD_ON

ProductionOrderStatus

  • RECEIVED

  • SCHEDULED

  • IN_PROGRESS

  • ROASTED

  • PACKAGED

  • SHIPPED

ProfileType

  • SINGLE_ORIGIN

  • PRE_ROAST_BLEND

Reason

  • FAILED

  • MISSING

  • PASSED

RecipeStatus

  • DRAFT

  • ACTIVE

  • ARCHIVED

RoleEnum

  • ADMINISTRATOR

  • COLLABORATOR

  • REGISTERED

RorProcessingCurveType

  • RECOMMENDED

  • SENSITIVE

  • NOISE_SMOOTHING

SampleType

  • TYPE_SAMPLE

  • OFFER

  • SPOT_OFFER

  • PRE_SHIPMENT

  • ARRIVAL

  • EVALUATION

SensorAlertState

  • ABOVE_LIMIT

  • BELOW_LIMIT

  • OUT_OF_RANGE

  • OUT_OF_BATTERY

  • GATEWAY_OFFLINE

SensorAlertType

  • TEMPERATURE

  • HUMIDITY

  • OFFLINE

SessionState

  • CREATED

  • OPEN

  • CLOSED

ShopType

  • SHOPIFY

  • WOO_COMMERCE

StageMeasurementType

  • BRIX

  • PH

  • TEMPERATURE

  • HUMIDITY

  • MOISTURE

  • WEIGHT

StageType

  • RECEPTION

  • PULPING

  • WET_FERMENTATION

  • DRY_FERMENTATION

  • SOAKING

  • SHADE_DRYING

  • SUN_DRYING

  • STORAGE

  • TRANSPORT

  • OTHER

Status

  • SCHEDULED

  • SYNCED

  • DONE

  • INCONSISTENT

SyncStatus

  • COMPLETED

  • FAILED

SystemNotificationType

  • INFO

  • WARNING

  • URGENT

TargetType

  • YIELD

  • BREW_WATER_VOLUME

  • TEMPERATURE

  • TIME

TaskFrequency

  • DAILY

  • WEEKLY

  • MONTHLY

  • HALF_YEARLY

  • YEARLY

  • ONE_TIME

TaskStatus

  • TO_DO

  • DONE

  • NOT_DONE

TimeAggregation

  • NONE

  • HOUR

  • DAY

  • WEEK

  • MONTH

  • QUARTER

  • YEAR

Unit

  • CELSIUS

  • FAHRENHEIT

  • M

  • CM

  • SQR_METER

  • SQR_KMETER

  • ACRES

  • HECTAR

  • MANZANA

  • CUARTIL

  • CUADRA

  • PLAZA

  • FANEGADA

  • TAREA

  • M3

  • DM3

  • CM3

  • LITRE

  • ML

  • FL_OZ

  • KG

  • LBS

  • G

  • OZ

  • BARREL15KG

  • BOX12_1KG

  • BOX20KG

  • BOX22_7KG

  • BOX23KG

  • BOX24KG

  • BOX24_2KG

  • BOX25KG

  • BOX30KG

  • BOX34KG

  • BOX35KG

  • BOX40KG

  • BOX50LBS

  • BOX65LBS

  • BAG10KG

  • BAG15KG

  • BAG17KG

  • BAG20KG

  • BAG25KG

  • BAG30KG

  • BAG34_5KG

  • BAG35KG

  • BAG45KG

  • BAG46KG

  • BAG50KG

  • BAG59KG

  • BAG64KG

  • BAG68KG

  • BAG69KG

  • BAG70KG

  • BAG60KG

  • BAG62_5KG

  • BAG50LBS

  • BAG100LBS

  • METRIC_TON

  • ARROBA

  • CARGA

  • FANEGA

  • QUINTAL

  • QUINTAL_COCO

  • QQ

  • LATA

  • HARVEST_LITRE

  • ALQUEIRE

  • PACKAGE0G

  • PACKAGE6G

  • PACKAGE50G

  • PACKAGE60G

  • PACKAGE90G

  • PACKAGE95G

  • PACKAGE100G

  • PACKAGE110G

  • PACKAGE121G

  • PACKAGE125G

  • PACKAGE150G

  • PACKAGE170G

  • PACKAGE200G

  • PACKAGE225G

  • PACKAGE230G

  • PACKAGE250G

  • PACKAGE300G

  • PACKAGE333G

  • PACKAGE340G

  • PACKAGE350G

  • PACKAGE380G

  • PACKAGE400G

  • PACKAGE500G

  • PACKAGE750G

  • PACKAGE950G

  • PACKAGE1KG

  • PACKAGE1_5KG

  • PACKAGE2KG

  • PACKAGE2_5KG

  • PACKAGE2720G

  • PACKAGE2_8KG

  • PACKAGE3KG

  • PACKAGE3_5KG

  • PACKAGE3_6KG

  • PACKAGE4KG

  • PACKAGE5KG

  • PACKAGE6KG

  • PACKAGE7KG

  • PACKAGE8KG

  • PACKAGE9KG

  • PACKAGE10KG

  • PACKAGE14KG

  • PACKAGE30KG

  • PACKAGE0_5LBS

  • PACKAGE1LBS

  • PACKAGE1_1LBS

  • PACKAGE1_5LBS

  • PACKAGE2LBS

  • PACKAGE2_5LBS

  • PACKAGE3LBS

  • PACKAGE3_5LBS

  • PACKAGE3_85LBS

  • PACKAGE4_5LBS

  • PACKAGE5LBS

  • PACKAGE6LBS

  • PACKAGE8_5LBS

  • PACKAGE10LBS

  • PACKAGE15LBS

  • PACKAGE16LBS

  • PACKAGE30LBS

  • PACKAGE50LBS

  • PACKAGE1OZ

  • PACKAGE2OZ

  • PACKAGE3OZ

  • PACKAGE4OZ

  • PACKAGE5OZ

  • PACKAGE6OZ

  • PACKAGE7OZ

  • PACKAGE8OZ

  • PACKAGE9OZ

  • PACKAGE10OZ

  • PACKAGE10_5OZ

  • PACKAGE11OZ

  • PACKAGE12OZ

  • PACKAGE16OZ

  • PACKAGE18OZ

  • PACKAGE22OZ

  • PACKAGE24OZ

  • PACKAGE36OZ

  • PACKAGE120OZ

  • LUMINOCITY

  • PERCENT

  • PPM

  • BRIX

  • NUMBER

  • BLANKNUM

  • PIECE

  • DOZEN

  • PACKAGE

  • SECOND

  • MINUTE

  • HOUR

  • MILLISECOND

  • DURATION

  • HZ

  • RPM

  • PASCAL

  • DEKAPASCAL

  • HEKTOPASCAL

  • KILOPASCAL

  • PSI

  • BAR

  • MILLIBAR

  • INCH_WC

  • AGTRON_GOURMET

  • AGTRON_COMMERCIAL

  • COLORTRACK

  • DIPPER

  • NEUHAUS_NEOTEC

  • PROBAT_COLORETTE

  • HUNTER_L

  • JAVALYTICS

  • KONICA_MINOLTA

  • TONINO

  • LIGHTTELLS

  • ROAMI

  • ROASTRITE

  • PH

  • M3_PER_S

  • ML_PER_S

  • FL_OZ_PER_S

  • KG_PER_S

  • G_PER_S

  • OZ_PER_S

  • VOLT

  • MMOL_PER_L

  • FRENCH_DEGREES

  • S_PER_M

  • US_PER_CM

UserInvitationDecision

  • ACCEPT

  • DECLINE

Objects

BigDecimal

This is simply a numeric value with a decimal.

Currency

Currencies are represented as a string by their ISO 4217 currency code.

DateTime

This is represented as a unix time stamp. Unix time is a way of representing time by the number of milliseconds that have elapsed since the Unix epoch. For example, 1577836800000 is the unix timestamp (in ms) for 00:00UTC 01/01/2020.

DateTimeZone

This is a representation of time zones, identifying which zone an entity belongs to. See here for more information.

Duration

This is a numeric representation of the time that has passed between two events. See here for more information.

LocalDate

Consists of a year, month, and day used to represent a specific date without a time zone. In the json payload, this is represented as "YYYY-MM-DD"

Locale

This is a string code, representing a language and potentially a geographical or political region, e.g. 'en_GB' represents British English. The locale selected will change your language and the representation of numbers and dates. See here for more information.

Measure

Represents a measured value, like mass (weight), temperature, pressure etc. It consists of a numeric amount and its unit, as well as a numeric amountSI, which represents the measured value in its SI-unit. The only exception to this rule is temperature, where amountSI represents the temperature in the derived SI-unit degree Celsius. This is for practical reasons, since Kelvin is barely used outside of scientific applications. Example:

{
    "amount": 100.0,
    "unit": "LBS",
    "amountSI": 45.359
}

Processing Step

The processing step as used on a lot informs in which 'state' or 'form' the current lot is. Processing steps are represented via a String. The following values are legal values for a processing step.

Coffee processing steps:

  • coffee.harvest coffee cherries (as harvested)

  • coffee.dryCherry coffee in the form of dried cherries

  • coffee.rawGreen coffee that wasn’t screened and sorted yet

  • coffee.parchment parchment coffee

  • coffee.green green coffee as it is traded and shipped globally

  • coffee.roasting coffee that was roasted already

  • coffee.blending coffee that was roasted already and got blended with other coffees (lots that are post roast blends)

Cocoa processing steps:

  • cocoa.harvest

  • cocoa.fermentation

  • cocoa.drying

  • cocoa.roasting

  • cocoa.blending

Point

A point represents a geometrical point in a two-dimensional space, consisting of a numeric x and y value. May also be used to represent latitude and longitude of GPS coordinates, respectively. If the referenced point object is non-null, both x and y must be non-null.

{
    "x": 10.0,
    "y": -5.0
}

MonetaryValue

This consists of a numeric amount and a currency.

ProcessingSource

This consists of a numeric lotId and a measure weight

QcSummary

This consists of a string averageScore, a numeric samplesCount, a string minSpread, and a string maxSpread to hold the structured result summary.

ScreenSizeGrain

This consists of a String screenSize, a measure weight, and a measure percentage.

TimeValue

This consists of a duration time and a numeric value.

Last updated 2021-11-23 07:58:09 UTC - v0.1 2021-11-23