POST
/source/{sourceId}/order/{orderId}/attachment
Create/Update Work Order Attachments
Work Order Attachment Definitions
POST /source/{sourceId} /order/{orderId} /attachment
Create/Update Work Order Attachments
Request URI
POST: https://api.soa-proxy.deere.com/aglogic/source/{sourceId}/order/{orderId}/attachment
Accept: */*
 
Data Format
The attachment should be a single file and should be posted as multipart form encoded data. (Seehttp://www.w3.org/TR/html401/interact/forms.html) The client of this POST should behave the same as a browser that is dealing with the following bit of HTML:
 
<form method="post" action="../v1/source/xyz/order/abc/attachment"
enctype="multipart/form-data">
    <input type="file" name="attachment"/>
    <input type="submit"/>
</form>
 
When the browser is handling this HTML there will be a “Browse” button that the user can interact with and get a dialog to find and select a file. Submitting the form transfers the file to the server. The filename is also passed to the server, so the client should try to pass a meaningful name, like<order-number> + “prescription.zip”.
The reference to a browser and HTML is only for comparison. A client will actually interact with whatever HTTP Client code components are available in their development environment.
 
Response Codes
Codes  
200 Success.
400 Bad Request. There was an error processing the contents of the message.
401 Unauthorized. There is a problem with the credentials provided.
404 Problem with the URL. Check that the URL matches the pattern described above, and that the orderId is known to AgLogic.
500 Server error. An unexpected error occurred on the server processing your post.
Work Order Attament Definitions  
Work Order Attachments
A work order may have an attachment associated with it.
 
A work order may have an attachment associated with it. For any work order that has already been posted to AgLogic, the client may also post an attachment. AgLogic does not care about the contents or type of file. An example of an attachment would be a prescription that is attached as a ZIP file. After an attachment has been posted, subsequent postings of an attachment for that order will over-write the previous attachment.