For Authorization use API token provided by Cospace Admin. (Authorization: add token to http headers)
CREATE NEW SOURCE (CUTTING PLACE)
Create new Source (cutting place) in Cospace system.
POST: 'https://your.cospace.url/plugins/com.twigex.woodl/api/v1/sources/create'
Request parameters:
{
"code": "string",
"property": "string",
"source_type_id": "string",
"season_type_id": "string",
"payment_type_id": "string",
"county": "string",
"parish": "string",
"supplier": "string",
"logger": "string",
"department": "string",
"date_from": "int64",
"date_to": "int64",
"certificates": ["string"]
}
On successful request, the following response object will be returned:
{
"id": "string",
"code": "string",
"property": "string",
"source_type_id": "string",
"season_type_id": "string",
"payment_type_id": "string",
"county": "string",
"parish": "string",
"supplier": "string",
"logger": "string",
"department": "string",
"date_from": "int64",
"date_to": "int64",
"date_finished": "int64",
"created_at": "int64",
"updated_at": "int64",
"deleted_at": "int64"
}
SOURCES
Returns existing Sources in the system.
GET: 'https://your.cospace.url/plugins/com.twigex.woodl/api/v1/sources'
On successful request, the following response object will be returned:
[
{
"id": "string",
"code": "string",
"property": "string",
"source_type_id": "string",
"season_type_id": "string",
"payment_type_id": "string",
"county": "string",
"parish": "string",
"supplier": "string",
"logger": "string",
"department": "string",
"date_from": "int64",
"date_to": "int64",
"date_finished": "int64",
"created_at": "int64",
"updated_at": "int64",
"deleted_at": "int64"
},
]
SOURCE TYPES
Returns existing Types of Sources in the system.
GET: 'https://your.cospace.url/plugins/com.twigex.woodl/api/v1/sources/types'
On successful request, the following response object will be returned:
[
{
"id": "string",
"name": "string",
"created_at": "int64",
"updated_at": "int64",
"deleted_at": "int64"
},
]
PAYMENT TYPES FOR SOURCES
Returns existing Types of Payment for Sources in the system.
GET: 'https://your.cospace.url/plugins/com.twigex.woodl/api/v1/sources/payments'
On successful request, the following response object will be returned:
[
{
"id": "string",
"name": "string",
"created_at": "int64",
"updated_at": "int64",
"deleted_at": "int64"
},
]
SOURCE SEASONS
Returns existing Seasons of Sources in the system.
GET: 'https://your.cospace.url/plugins/com.twigex.woodl/api/v1/sources/seasons'
On successful request, the following response object will be returned:
[
{
"id": "string",
"name": "string",
"created_at": "int64",
"updated_at": "int64",
"deleted_at": "int64"
},
]
CLIENTS
Returns existing Clients in the system.
GET: 'https://your.cospace.url/plugins/com.twigex.woodl/api/v1/clients?type=suppliers' (types: suppliers, transporters, consumers, forestry)
On successful request, the following response object will be returned:
[
{
"id": "string",
"partner_type": "int",
"company_type": "string",
"name": "string",
"vat": "string",
"line1": "string",
"line2": "string",
"city": "string",
"zip_code": "string",
"state": "string",
"country": "string",
"phone": "string",
"email": "string",
"created_at": "int64",
"updated_at": "int64",
"deleted_at": "int64"
}
]
DEPARTMENTS
Returns existing Departments in the system.
GET: 'https://your.cospace.url/plugins/com.twigex.woodl/api/v1/departments'
On successful request, the following response object will be returned:
[
{
"id": "string",
"parent_id": "string",
"name": "string",
"description": "string",
"address": "string",
"created_at": "int64",
"updated_at": "int64",
"deleted_at": "int64"
}
]