Recent
Convenience service to list recently updated resources
Description
This service allows to retrieve the list of recently updated/created:
- Attachemnts
- Product
- Projects
- Project lines
- Checkpoint (validated)
- Packing lists
The scope can be specified to be either the token owner’s visible objects (joined projects/products) or, if the token owner is a company admin/product_owner, the whole company.
The purpose of those services is to serve as an entry point to build efficient interfaces with the Winddle API: by first pulling those services, you can determine what needs to be pulled from Winddle to update your data.
GET /api/v1/recent/attachments
This service allows to retrieve the list of recently uploaded files.
The scope of the attachments being checked can be specified with the scope
param:
-
The value
company
will look for attachments uploaded by the token’s owner company. This option is only authorized for Company admins/product_owner. -
The value
user
(default) will look for attachments directly uploaded by the token’s owner
Information on what the file has been uploaded to can be found in the uploaded_to
key of the response.
The current version of the file can be found at the top level of the array, however, all other versions are available in the key versions
.
The default time delta in days is 3 days but can be customized to any integer value up to 100 days.
See the example below to see the available data.
Examples
{ "resource": { "type": "attachments", "action": "recent" }, "attachments": [ { "id": 686, "source_id": null, "name": "Example_File.ext", "filename": "Example_File.ext", "url": <url to download the file from>, "size": "1255", "created_at": "2014-05-14T02:03:20.000Z", "updated_at": "2014-05-14T02:03:20.000Z", "updatable": true, "px40": "", "px75": "", "px150": "", "nc1000": "", "mime_type": "test/csv", "versions": [ { "id": 719, "filename": "Import_exemple__3.csv", "size": "1255", "mime_type": "test/csv", "url": <url to download the file from>, "created_at": "2014-05-14T02:03:20.000Z", "px40": "", "px75": "", "px150": "", "nc1000": "", "owner": { "id": 62, "first_name": "Guillaume", "last_name": "Grenet", "full_name": "Guillaume Grenet", "initials": "GG", "email": "guillaume.grenet@winddle.com", "created_at": "2013-07-23T01:17:34.000Z", "updated_at": "2014-05-14T02:02:47.000Z", "px40": null, "px150": null, "company": "Winddle" } } ], "owner": { "id": 62, "first_name": "Guillaume", "last_name": "Grenet", "full_name": "Guillaume Grenet", "initials": "GG", "email": "guillaume.grenet@winddle.com", "created_at": "2013-07-23T01:17:34.000Z", "updated_at": "2014-05-14T02:02:47.000Z", "px40": null, "px150": null, "company": "Winddle" }, "uploaded_to": { "type": "LineItem", "id": 3188, "source_id": null, "reference": null } } ] }
Params
Param name | Description |
---|---|
delta_days optional |
List updated attachments in past X delta days (default to 3) Must be a Integer |
delta_hours optional |
Overwrite |
since optional |
Timestamp for filtering updated attachments (RFC2616, RFC2822, ISO8601) Must be a String |
scope optional |
Scope of the project lines to check (default to user) Must be one of:user , company .
|
GET /api/v1/recent/line_items
Retrieve the latest updated/created Project Lines within the past few days
This service allows to retrieve the list of recently updated Project Lines.
The scope of the projects being checked can be specified with the scope
param:
-
The value
company
will look for Project Lines created by the token’s owner company. This option is only authorized for Company admins/product_owner. -
The value
user
(default) will look for Project Lines where the the token’s owner is a partner/owner.
The default time delta in days is 3 days but can be customized to any integer value up to 100 days.
See the example below to see the available data.
Examples
{ "resource": { "type": "line_items", "action": "recent" }, "line_items": [ { "id": 3089, "source_id": null, "deliver_at": "2014-05-26", "total_price": null, "total_quantity": null, "manufacturer": null, "reference": null, "packing_conditions": null, "locked": false, "archived": false, "created_at": "2014-04-24T01:35:16.000Z", "updated_at": "2014-05-13T03:45:48.000Z", "checkpoints": [], /* if checkpoints == true */ "milestones": [], /* if milestones == true */ "product": { ... }, "project": { ... } } ]
Params
Param name | Description |
---|---|
delta_days optional |
List updated project lines in past X delta days (default to 3) Must be a Integer |
delta_hours optional |
Overwrite |
since optional |
Timestamp for filtering updated project lines (RFC2616, RFC2822, ISO8601) Must be a String |
scope optional |
Scope of the project lines to check (default to user) Must be one of:user , company .
|
archived optional |
If true, only returns archived line items (default to false) Boolean (true/false) |
checkpoints optional |
If true, return checkpoints details (default to false) Boolean (true/false) |
milestones optional |
If true, return milestones details (default to false) Boolean (true/false) |
compact optional |
If true, return minimum info for project and line_item (default to false) Boolean (true/false) |
adjust optional |
If true, adjust the dates to take into account delays (default to false) Boolean (true/false) |
filter optional |
Filters to apply on the list of Project Line to return Param for filters |
GET /api/v1/recent/projects
Retrieve the latest updated/created Projects within the past few days
This service allows to retrieve the list of recently updated Projects.
The scope of the projects being checked can be specified with the scope
param:
-
The value
company
will look for Projects created by the token’s owner company. This option is only authorized for Company admins/product_owner. -
The value
user
(default) will look for Projects where the the token’s owner is a partner/owner.
The default time delta in days is 3 days but can be customized to any integer value up to 100 days.
See the example below to see the available data.
Examples
{ "resource": { "type": "projects", "action": "recent" }, "projects": [ { "id": 1827, "source_id": null, "name": "Example New Project", "company_id": 47, "created_at": "2014-05-14T01:18:12.000Z", "updated_at": "2014-05-14T01:18:12.000Z", "reference": null, "archived": false, "season": null, "warehouse": null, "warehouse_code": null, "departure_place": null, "country_of_origin": null, "arrival_place": null, "transportation_mode": null, "payment_conditions": null, "factory": null, "incoterm": null, "project_type": "order", "laboratory": null, "final_customer": {}, "supplier": {}, "buyer": { "id": 62, "first_name": "Guillaume", "last_name": "Grenet", "full_name": "Guillaume Grenet", "initials": "GG", "email": "guillaume.grenet@winddle.com", "company": { "id": 47, "name": "Winddle", "px40": "/assets/fallback/default-company-px40.png" }, "px40": null, "px75": null, "px150": null, "nc1000": null, "default_currency": "EUR", "position": {} }, "customs": [] } ] }
Params
Param name | Description |
---|---|
delta_days optional |
List updated projects in past X delta days (default to 3) Must be a Integer |
delta_hours optional |
Overwrite |
since optional |
Timestamp for filtering updated projects (RFC2616, RFC2822, ISO8601) Must be a String |
filter optional |
Filters to apply on the list of Projects to return Param for filters |
scope optional |
Scope of the projects to check (default to user) Must be one of:user , company .
|
GET /api/v1/recent/checkpoints
Retrieve the latest validated CP within the past few days
This service allows to retrieve the list of recently validated Checkpoints.
The scope of the checkpoints being checked can be specified with the scope
param:
-
The value
company
will look for Checkpoints in the Project Lines of Projects owned by the token owner’s company. This option is only authorized for Company admins/product_owner. -
The value
user
(default) will look for Checkpoints in Project Lines where the token owner is a partner, regardless of the Project’s company.
The default time delta in days is 3 days but can be customized to any integer value up to 100 days.
See the example below to see the available data.
Examples
{ "resource": { "type": "checkpoints", "action": "recent" }, "checkpoints": [ { "id": 10262, "name": "(Sh) Step 3", "description": null, "master_checkpoint_id": 690, "master_checklist_id": 230, "status": "validated", "begin_at": "2013-12-10", "duration": 5, "validated_at": "2014-05-13T09:03:44.000Z", "delay": 149, "children": [], "parents": [ 10261 ], "delivery": true, "min_child_gap": 0, "max_child_gap": 0, "time_calculation_method": "parent_due_date", "has_issue": false, "critical_path": true, "line_item": { "id": 599, "reference": null, "source_id": null }, "project": { "id": 575, "name": "5421 TO", "reference": null, "source_id": null, "project_manager": { "id": 65, "first_name": "Emilia", "last_name": "Jevakhoff", "full_name": "Emilia Jevakhoff", "initials": "EJ", "email": "emilia.jevakhoff@winddle.com", "created_at": "2013-07-24T09:56:53.000Z", "updated_at": "2014-05-13T08:54:56.000Z", "px40": null, "px150": null, "company": "Winddle" } } } ] }
Params
Param name | Description |
---|---|
delta_days optional |
List validated checkpoints in past X delta days (default to 3) Must be a Integer |
since optional |
Timestamp for filtering validated checkpoints (RFC2616, RFC2822, ISO8601) Must be a String |
scope optional |
Scope of the checkpoints to check (default to user) Must be one of:user , company .
|
filter optional |
Filters to apply on the list of Checkpoints to return Param for filters |
GET /api/v1/recent/packing_lists
Retrieve the latest validated packing lists within the past few days.
This service allows to retrieve the list of recently validated packing lists.
The scope of the packing lists being checked can be specified with the scope
param:
-
The value
company
will look for packing lists validated by the token’s owner company. This option is only authorized for Company admins/supervisor -
The value
user
(default) will look for packing lists used in project lines joined by the token owner, regardless of their company.
The default time delta in days is 3 days but can be customized to any integer value up to 100 days.
See the example below to see the available data.
Examples
{ "resource": { "type": "packing_lists", "action": "recent" }, "packing_lists": [ { id: 2152, company_id: 12, reference: 4815162342, validated: true, validated_at: 2017-01-02, packages: [{ count: 1, volume: 12, net_weight: 12, gross_weight: 12, content: [{ product: { id: 2132, name: ProductName }, variant: [{ id: 12332, name: VariantName }], size: "L", quantity: 12 }] }], validated_by: {}, line_items: [{ id: 231223, deliver_at: 2017-02-10 project: { id: 1232, name: ProjectName, reference: ProjectReference, }, product: { id: 2132, name: ProductName, reference: ProductReference, used_variants: [{ id: 12332, }], variants: [{ id: 12332, name: VariantName, reference: VariantReference, }] } }] } ] }
Params
Param name | Description |
---|---|
delta_days optional |
List updated packing lists in past X delta days (default to 3) Must be a Integer |
delta_hours optional |
Overwrite |
since optional |
Timestamp for filtering validated packing lists (RFC2616, RFC2822, ISO8601) Must be a String |
scope optional |
Scope of the packing lists to check (default to user) Must be one of:user , company .
|