Search Results for

    Show / Hide Table of Contents

    Export Shipments from Magento V2

    This task will export shipments from Magento in an XML format. The results can be filtered if required. See below for a sample output file.

    GET /V1/shipments

    Settings

    Connection

    Required
    The Magento V2 connection to use. See the Connecting to Magento v2 article if you require more information on how to create/manage connections.

    Export Customers

    Optionally export customer information associated to each record. Please note, in order to successfully run the task with this setting enabled you must also enable the export orders setting.

    Export Products

    Optionally export the related product record for each order item.

    Export Orders

    Optionally export order information associated to each record.

    Export Settings > Date Created

    Required
    When the 'Export Modified, New or All Records' setting is set to 'All', only shipments created after this date will be exported. This date will update automatically each time the task runs.

    Export Settings > Date Modified

    Required
    When the 'Export Modified, New or All Records' setting is set to 'Modified', only shipments updated after this date will be exported. This date will update automatically each time the task runs.

    Export Settings > Export Modified, New or All Records

    Required
    Choose which records should be exported. The available options are:

    • Modified - Only records updated after the date shown in the 'Date Modified' setting will be exported.
    • New - Only records created after the date shown in the 'Date Created' setting will be exported.
    • All - All records will be exported, regardless of when they were created or updated.

    Filter Groups

    Optional
    The filtering to apply to the records. Only records which match the criteria specified will be exported.

    Filters are arranged into groups. The individual filters within a group will be combined using the OR operator. Groups of filters are combined using the AND operator.

    Filter Groups > Filter > Condition

    Optional
    The following types of filter are available:

    • Equal - Returns records where the field matches the specified value.
    • NotEqual - Returns records where the field does not match the specified value.
    • Like - Returns records where the field contains the specified value.
    • In - Returns records where the field matches one of the specified values.
    • NotIn - Returns records where the field does not match one of the specified values.
    • Null - Returns records where the field does not have a value.
    • NotNull - Returns records where the field has a value.
    • GreaterThan - Returns records where the field is greater than the specified value.
    • LessThan - Returns records where the field is less than the specified value.
    • GreaterThanOrEqual - Returns records where the field is greater than or equal to the specified value.
    • LessThanOrEqual - Returns records where the field is less than or equal to the specified value.

    Filter Groups > Filter > Field

    Optional
    The name of the field the filter is to be based upon. The name should match the API field name, as seen in the output file.

    Filter Groups > Filter > Value

    Optional
    The value the filter is to be based upon. This is not required when using the 'Null' or 'NotNull' condition type.

    Ignore Related Record Errors

    Required
    Set to true to ignore any errors that occur when trying to fetch related records and continue the export regardless. When set to false, any errors that occur when trying to fetch related records will cause the task to fail. Defaults to false.

    Page Size

    Required
    The number of records to include in each page of results. Defaults to 50. Increasing this value will increase the speed of the export, but will consume more memory.

    Store View Code

    Required
    The Magento store view code to perform the API calls against. Default value of 'default'.

    Output File

    Required
    The name of the file to export the products to.

    Zynk Settings

    See Common Task Settings.

    Examples

    A sample output file is shown below.

    <?xml version="1.0" encoding="utf-8"?>
    <ArrayOfShipment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Shipment>
        <entity_id xsi:nil="true" />
        <capture xsi:nil="true" />
        <items>
          <item>
            <order_item_id>79</order_item_id>
            <qty>1</qty>
            <entity_id>35</entity_id>
            <name>Joust Duffle Bag </name>
            <parent_id>29</parent_id>
            <price>11.3</price>
            <product_id>1</product_id>
            <row_total xsi:nil="true" />
            <weight xsi:nil="true" />
          </item>
        </items>
        <notify xsi:nil="true" />
        <append_comment xsi:nil="true" />
        <tracks>
          <track>
            <track_number>abcd-1234</track_number>
            <title>DHL Next Day Shipping</title>
            <carrier_code>DHL</carrier_code>
            <created_at>2019-11-29T10:25:53</created_at>
            <entity_id>1</entity_id>
            <order_id>42</order_id>
            <parent_id>29</parent_id>
            <qty xsi:nil="true" />
            <updated_at>2019-11-29T10:25:53</updated_at>
            <weight xsi:nil="true" />
          </track>
        </tracks>
        <billing_address_id>84</billing_address_id>
        <comments />
        <created_at>2019-11-29T10:25:53</created_at>
        <customer_id>13</customer_id>
        <email_sent xsi:nil="true" />
        <increment_id>000000029</increment_id>
        <order_id>42</order_id>
        <shipment_status xsi:nil="true" />
        <shipping_address_id>83</shipping_address_id>
        <store_id>1</store_id>
        <total_qty>1</total_qty>
        <total_weight xsi:nil="true" />
        <updated_at>2019-11-29T10:25:53</updated_at>
      </Shipment>
    </ArrayOfShipment>
    
    In This Article
    Zynk Documentation © 2021, Zynk Software Limited. Zynk is a registered trademark of Zynk Software Limited