User Tools

Site Tools


en:soap_funktionen

Interface - SOAP functions

Here you can find a more detailed description of the SOAP functions.

Connection test

ping

For testing availability of the Web service.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password

Order transmission

init_transaction

Initialises a print order and returns the transaction code. All further order-specific data transmissions and function calls require this transaction code to be able to assign the order correctly.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password

Response in element “Date” [Array]:

Element Description
[“transaction_code”] Transaction code (varchar 255)

pic_up_xml

You can use pic_up_xml to manually import an XML file that has been transmitted to us by sFTP.
You receive immediate feedback whether the order could be accepted.

To be able to use this function, sFTP access must be used to create a directory named by the transaction code in the “incoming” directory (analogously to the pic_up_binary_data function), in which the XML file to be imported must be saved.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code
[“filename”] The name of the XML file to be imported.

Response in element “Data” [Array]:

Element Description
[“transaction_code”] Transaction code

pic_up_binary_data

Starts the pick-up of binary data that you have previously transmitted to our server.

Within this directory, you must create a subdirectory for the pick-up, which must be named according to the transaction code from init_transaction. PDI will search these directories for the files named when pic_up_ftp_binary_data is called.

Alternatively, PDI can also retrieve the data from your server. To do this, the server and access data must be known to PDI and the file must be entered in the order XML using a URL specification (see XML examples ).

The pick-up can take place from:

  • FTP server
  • sFTP server
  • SCP server
  • Web server via HTTP
  • Web server via HTTPs

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code from init_job

Response in element “Data” [Array]:

Element Description
[][“filename”] Name of the file found.
[][“success”] [0,1] – specifies whether the file could be picked up successfully.
[][“error_msg”] Error message if the pick-up was unsuccessful
(for example if the file was not listed in the data XML)

close_transaction

This function can be used to close an order.

This is considered a preliminary order confirmation and the order then moves into the preprocessing stage. Once the order passed the automatic preflight check, for example, it is assigned the status “new” and is production-ready.

If preprocessing fails, the order is cancelled and you will receive a response on the response channel specified at the beginning of the project.

Product-ready orders are automatically provided to Production at the defined production times.

An order can only be placed once all XML data and declared binary files have been transmitted.

Once a transaction/order is closed, no additional XML or binary data can be transmitted.

A preview request provides the last preview generated, if one was generated before close_transaction. If not, later preview generation is not possible.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code from init_job

Response in element “Data”:

None

Order modification

get_available_objects

Provides information about all the products you can order.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password

Response in element “Data” [Array]:

Element Description
[][“id”] ID of the print object. Needed to initiate a print order with init_job.
[][“name”] Name of the print object.

get_xml

Returns the order XML already transmitted.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code from init_job

Response in element “Data” [String]:

The XML file transmitted.

get_binary_data

Returns a list of URLs that can be used to download the data transmitted for a transaction.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code

Response in element “Data” [Array]:

Element Description
[Array key/Value] “filename” “fetch URL

get_expected_binaries

Returns a list of all expected filenames declared in the order XML.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code from init_job

Response in element “Data” [Array]:

Element Description
[][“filename”] Filename of the file declared in the data XML.
[][“existing”] [0,1] – specifies whether the file has already been transmitted successfully or not.

get_status_by_transaction_code / get_status_by_customer_reference

Returns the current status of a job.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”]
[“customer_reference_order”]
(Optional) Transaction code or customer reference from init_job or from the XML data for the order. If the transaction code / customer reference is not provided, all jobs and their status values are returned.

Response in element “Data” [Array]:

Element Description
[“id”] ID of the order
[“barcode”] Barcode of the order
[“customer_reference_order”] Your reference of the order
[“status_code”] Status code of the order
[“status_desc”] Status of the order
[“order_items”][“id”] ID of the order posts
[“order_items”][“barcode”] Barcode of the order posts
[“order_items”][“status_code”] Status code of the order posts
[“order_items”][“status_desc”] Status of the order posts

Possible return values see “Tracking status codes

get_sample_xml_of_object

Returns sample XML for the product.

set_expiration_date

Sets the expiration date for a transaction. Called if incomplete transactions should be protected from the automatic deletion process beyond the default value in the project configuration.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code
[“expiration_date”] Format yyyy-mm-dd

Response in element “Data” [Array]:

Element Description
[“transaction_code”] Transaction code

set_order_item_quantity

Sets or changes the quantity of an item. This is only in status “open”.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code
[“order_item_id”]
or
[“order_item_barcode”]
“12345
or
“PI12345”
[“quantity”] Quantity

Response in element “Data” [Array]:

None

set_order_item_reference

Sets or changes the customer reference (your reference) for an item. This is only in status “open”.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code
[“order_item_barcode”] Item barcode, e.g. “PI12345”
[“reference”] A reference from your system.

Response in element “Data” [Array]:

None

set_order_reference

Sets the customer reference (your reference) for an order. This is only in status “open”.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code
[“order_id”]
or
[“order_barcode”]
“12345”
or
“PO12345”
[“reference”] A reference from your system.

Response in element “Data” [Array]:

None

set_order_biller_address / set_order_customer_address / set_order_billing_address / set_order_delivery_address / set_order_shipper_address

There are 5 functions to change or set the addresses for an order.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code
[“order_id”]
or
[“order_barcode”]
“12345”
or
“PO12345”
[“data”] array (key value)

Possible values for data array

Key Description
[“reference”] Reference
[“company”] Company name
[“salutation”] Salutation
[“first_name”] First name
[“middle_name”] Middle name
[“last_name”] Last name
[“title”] Title
[“address”] Address
[“address2”] Second line of address
[“city”] City
[“postcode”] Postal code
[“state”] State
[“country”] Country
[“countrycode”] Country code
[“phone”] Phone
[“fax”] Fax
[“email”] Email
[“comment”] Comment

Response in element “Data” [Array]:

None

generate_preview

Generates a preview for an item and returns a URL for downloading the PDF file. After submission of XML and binaries (sFTP) and use of the pic_up-Methods, you get the required item-id's for this method by using the method 'get_status_by_transaction_code / get_status_by_customer_reference'.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code
[“item_id”]
or
[“item_barcode”]
“12345”
or
“PI12345”

Response in element “Data” [Array]:

Element Description
[url] fetch URL

cancel_order

Cancels an order or all orders for the specified transaction.

  • Cancellation before production
    Cancellation in status “open”, “preprocessing” or “new” is free of charge.
  • Cancellation during production
    During production, there is a charge for cancellations.
    Production costs will be invoiced.
    Shipping costs will not be invoiced.
  • Cancellation after shipping
    Cancellation is no longer possible here. Full costs will be invoiced.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] [“order_id”] Transaction code optional; if not specified, all orders for this transaction will be cancelled

Response in element “Data” [Array]:

Element Description
[“transaction_code”] Transaction code

duplicate

Copies a complete transaction or a certain order in a transaction to the specified transaction.

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“transaction_code”] Transaction code
[“order_id”]
or
[“order_barcode”]
“12345”

“PO12345”

Response in element “Data” [Array]:

Element Description
[“transaction_code”] New transaction code

add_stock_product

Creates a new stock item.

This function is needed if you don't want to ship print orders (item type=pod) but simply add them to stock. To do this, enter the option “STORE” in the print order and the item ID that you generated with this function. Stock items can be ordered and shipped after storage as pick orders (item type=stock in combination with the “SHIP” option).

Parameters expected:

Element Description
[“client”] Your client code
[“pass”] Your MD5-encrypted password
[“data”] array (key value)

Possible values for data array

Name Key Type Default
Product name name String (255)
Your item reference
(maps to field customer_reference_stock_product)
cu_art_nr String (255)
Minimum stock min_stock int 0
Weight weight int 0
Width dimension_w int 0
Height dimension_h int 0
Depth dimension_d int 0
Check MHD use_min_endurance enum 0/1 0
Check lot number use_charge_number enum 0/1 0
Max. Temp. indoors C° max_inner_temp enum 0/1 0
Max Temp. outdoors C° max_outer_temp enum 0/1 0
Max. humidity % max_inner_humidity enum 0/1 0


Response in “Data” element [Array]:

Element Description
[“ID”] ID of the stock item


en/soap_funktionen.txt · Last modified: 2019/04/08 16:35 (external edit)