Forms. 12 operations.
12 of them work. Each needs a bearer token with its scope. All operations.
Operations
POST/api/v1/forms/enquiries/{id}/notesforms.add-enquiry-noteforms.write
GET/api/v1/forms/enquiriesforms.enquiriesforms.read
Parameters
statusquery | stringOnly the enquiries of this status: new, answered, closed or spam; every status but spam when left out. |
afterquery | integerThe id of the last enquiry of the page before; the first page when left out. |
limitquery | integerThe most enquiries in the page: 1 to 100; 50 when left out. |
Answer
Errors: 401, 403, 405, 422, 429
curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/forms/enquiries
GET/api/v1/forms/enquiries/{id}forms.enquiryforms.read
GET/api/v1/forms/enquiries/countsforms.enquiry-countsforms.read
GET/api/v1/forms/formsforms.formsforms.read
POST/api/v1/forms/submissions/{number}/readforms.mark-submission-readforms.write
POST/api/v1/forms/enquiries/{id}/statusforms.set-enquiry-statusforms.write
POST/api/v1/forms/submissions/{number}/noteforms.set-submission-noteforms.write
POST/api/v1/forms/submissions/{number}/statusforms.set-submission-statusforms.write
GET/api/v1/forms/files/{id}forms.submission-fileforms.read
GET/api/v1/forms/submissionsforms.submissionsforms.read
Read a page at a time: give limit (1 to 500; 100 when none is given) and after, the Next-Cursor of the page before. Follow the Link, rel next, to the rest.
Parameters
formquery | stringOnly the submissions of this form (its name in store.yaml); every form when left out. |
statusquery | stringOnly the submissions of this status: new or done; either when left out. |
limitquery | integerThe most submissions in the page: 1 to 500; 100 when the call gives no limit. The Next-Cursor and Link headers name the next page. |
afterquery | stringSee common parameters |
Answer
array of Submission
Errors: 400, 401, 403, 405, 422, 429
curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/forms/submissions
Schemas 19
Enquiry
Enquiry is an enquiry, as the store keeps it.
atrequired | string (date-time) |
emailrequired | string |
erasedrequired | boolean |
idrequired | integer |
messagerequired | string |
namerequired | string |
phonerequired | string |
product_namerequired | string |
product_slugrequired | string |
quantityrequired | integer |
skurequired | string |
statusrequired | EnquiryStatus |
verdictrequired | string |
EnquiryChange
EnquiryChange is what a change did: Changed is false when the enquiry stood as asked.
changedrequired | boolean |
statusrequired | EnquiryStatus |
EnquiryCounts
EnquiryCounts are the enquiries by status, and when the oldest new one was made (nil when none is new): the Home attention line.
answeredrequired | integer |
closedrequired | integer |
newrequired | integer |
oldest_new | string (date-time) |
spamrequired | integer |
EnquiryDetail
EnquiryDetail is one enquiry with its notes, oldest first.
enquiryrequired | Enquiry |
notesrequired | array of EnquiryNote |
EnquiryList
EnquiryList is a page of enquiries and the counts of all of them. Next is the cursor of the page after, 0 for none.
countsrequired | EnquiryCounts |
itemsrequired | array of Enquiry |
nextrequired | integer |
EnquiryNote
EnquiryNote is a note the owner added to an enquiry.
atrequired | string (date-time) |
byrequired | string |
idrequired | integer |
textrequired | string |
EnquiryNoteRequest
EnquiryNoteRequest is a note to add: 1 to 2000 characters.
textrequired | string |
EnquiryStatus
EnquiryStatus is where an enquiry stands.
string
EnquiryStatusRequest
EnquiryStatusRequest is the status an enquiry is set to: answered, closed or spam. Setting spam suppresses the sender for further enquiries (ASI-6.8); an enquiry cannot be set back to new.
statusrequired | EnquiryStatus |
Field
Field is one field of a submission: its name, its label as store.yaml gives it now, and the value given.
labelrequired | string |
namerequired | string |
valuerequired | string |
FormSummary
FormSummary is a form store.yaml defines, with how many submissions it holds (ASI POS and Mail F5).
donerequired | integer |
empty_text | string |
namerequired | string |
newrequired | integer |
titlerequired | string |
ReadChange
ReadChange is what a read mark did: whether it changed the item from unread to read for its actor.
changedrequired | boolean |
Submission
Submission is a form submission, as the store keeps it.
atrequired | string (date-time) |
done_at | string (date-time) |
done_by | string |
fieldsrequired | array of Field |
files | array of SubmissionFileRef |
formrequired | string |
note | string |
note_at | string (date-time) |
note_by | string |
numberrequired | integer |
readrequired | boolean |
statusrequired | string |
titlerequired | string |
SubmissionChange
SubmissionChange is what a call that changes a submission answers: whether it changed anything, and the submission as it then stands.
changedrequired | boolean |
submissionrequired | Submission |
SubmissionFile
SubmissionFile is a file a submission carries as the engine kept it (F1): what names it, and its bytes, base64 in JSON.
content_typerequired | string |
datarequired | string |
fieldrequired | string |
idrequired | string |
labelrequired | string |
namerequired | string |
sizerequired | integer |
SubmissionFileRef
SubmissionFileRef names a file a submission carries (F1): its id, which is also its address (GetSubmissionFile), the field it came through and that field's label, the name it is shown by (the client's, cleaned of any path and markup), its media type as the engine found it from its first bytes, and its size in bytes.
content_typerequired | string |
fieldrequired | string |
idrequired | string |
labelrequired | string |
namerequired | string |
sizerequired | integer |
SubmissionNoteRequest
SubmissionNoteRequest is the body of the call that sets the staff note of a submission: Note, "" to clear it.
noterequired | string |
SubmissionStatusRequest
SubmissionStatusRequest is the body of the call that marks a submission: Status is new or done.
statusrequired | string |
UnreadCount
UnreadCount is how many items the reader has not marked read.
unreadrequired | integer |
Made from engine/internal/openapi/openapi.json at commit 6c4cbd921. The contract-only operations come from the engine’s stub file, engine/internal/ops.