SAM Labels API

The SAM 3 front-end integrates with our SAM Labels software through the use of a JSON RPC API handled over a secure HTTPS connection running on port 443. The SAM front-end contacts the SAM Labels software through the following endpoint: https://samlabels.app/api/. The SAM Labels server is an Apache server running PHP 5.6.

There are two different types of requests made to the SAM Labels server under the following actions samAuth and submitLabels. The SAM 3 front-end first sends a JSON request under the samAuth action to authorize the user with the SAM Labels server. The request sends a hashed key based on the project the user is logged in under and the record type that the user is requesting labels for. The SAM Labels server then sends a generated API token to be used in the submitLabels endpoint.

The submitLabels endpoint request contains the selected record field data and the API token. The SAM Labels server then creates the pertinent labels based on the passed in record data and returns a label ID. The SAM 3 front-end creates an Iframe which loads the URL to samlabels.app with the label ID and generated API token to present the labels to the end user in a popup modal. When this link is loaded, SAM Labels send over the pertinent HTML5 data which then generates the labels based on the given label design.

To export the labels for print, SAM Labels integrates with a third party service PDFCrowd for converting the HTML to a PDF document.