@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api VTEX DO API
@base https://apiexamples.vtexcommercestable.com.br/api/do
@version 1.0
@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header
@common_fields {Content-Type: str, Accept: str}
@endpoints 8
@toc notes(3), tasks(5)

@group notes
@endpoint POST /notes
@required {target: map{id: str, type: str, url: str}, domain: str, description: str}
@optional {createdBy: map{id: str, name: str}}
@returns(200) {id: str, domain: str, owner: str, target: map{id: str, type: str, url: str}, description: str, creationDate: str, lastUpdate: str, createdBy: map?{id: str, name: str, email: str, key: str?}}

@endpoint GET /notes
@required {target.id: str}
@optional {perPage: int, page: int, reason: str}
@returns(200)

@endpoint GET /notes/{noteId}
@required {noteId: str}
@optional {reason: str}
@returns(200)

@endgroup

@group tasks
@endpoint POST /tasks
@required {target: [map{id!: str, type!: str, url!: str}], domain: str, context: str, name: str, priority: str, surrogateKey: str, dueDate: str, assignee: map{id: str, name: str, email!: str}, followers: [map{id: str, name: str, email!: str}]}
@optional {description: str, parentTaskId: str}
@returns(200)

@endpoint GET /tasks
@optional {assignee.email: str, target.id: str, context: str, page: str, perPage: str, status: str}
@returns(200) {piiHidden: bool, items: [map], paging: map{page: int, perPage: int, total: int, pages: int}}

@endpoint GET /tasks/{taskId}
@required {taskId: str}
@returns(200)

@endpoint PUT /tasks/{taskId}
@required {taskId: str, status: str(Open/Closed/Suspended/InProgress)}
@returns(200)

@endpoint POST /tasks/{taskId}/comments
@required {taskId: str, text: str}
@returns(200)

@endgroup

@end
