0

I'm trying to create a FileTransferActivity using the SOAP API. According to the docs, it should be possible to both create and perform a FileTransferActivity, but no examples are given.

This is what my current SOAP envelope looks like:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Body>
    <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
      <Options/>
      <Objects xsi:type="FileTransferActivity">
        <Name>TestinFileTransferActivity</Name>
        <PartnerProperties>
          <FileTransferLocationID>e4c11cbd-7826-459b-9953-5b878ea329c2</FileTransferLocationID>
          <Name>FileTransferTest</Name>
          <Description>FileTransferTest</Description>
          <CustomerKey>FileTransferText</CustomerKey>
          <FileSpec>testing.csv</FileSpec>
          <IsActive>true</IsActive>
          <IsEncrypted>false</IsEncrypted>
          <IsCompressed>false</IsCompressed>
          <IsSigned>false</IsSigned>
          <MaxFileAge>0</MaxFileAge>
          <IsUpload>true</IsUpload>
          <IsPgp>false</IsPgp>
          <IsFileSpecLocalized>false</IsFileSpecLocalized>
          <MaxImportFrequency>0</MaxImportFrequency>
          <MaxFileAgeScheduleOffset>0</MaxFileAgeScheduleOffset>
        </PartnerProperties>
      </Objects>
    </CreateRequest>
  </Body>
  <Header>
    <fueloauth xmlns="http://exacttarget.com">{{AuthTokenIsHere}}</fueloauth>
  </Header>
</Envelope>

When I use the above envelope and the create method I get the error

[
  {
    "StatusCode": "Error",
    "StatusMessage": "Error",
    "OrdinalID": "0",
    "ErrorCode": "9999999",
    "NewID": "0",
    "Object": {
      "PartnerKey": "",
      "PartnerProperties": {
        "Name": "FileTransferTest"
      },
      "ObjectID": "",
      "Name": "TestinFileTransferActivity"
    }
  }
]

Which is not proving to be too helpful.

I am wondering if anyone has created a FileTransferActivity using the SOAP API and can help me out?

2
  • 1
    Not documented, but see the automation/v1/rest route to see the methods available on File Transfers. SOAP's not going to work here.
    – Macca
    Sep 22, 2020 at 13:31
  • So this is not possible at all using SOAP? Mar 2, 2021 at 14:36

1 Answer 1

2

Based on Macca's comment you will find an undocumented endpoint:

automation/v1/filetransfers

Here is a code example based on your values:

var payload = {
        Name: 'TestinFileTransferActivity',
        CustomerKey: 'TestinFileTransferActivity',
        FileTransferLocationId: "e4c11cbd-7826-459b-9953-5b878ea329c2",
        Description: "FileTransferTest",
        FileSpec: 'testing.csv'
    };

var token = --getToken--,
    header = {
        header: {
            Authorization: "Bearer " + token
        }
    };

httpRequest('POST',"https://xxxxxxxxxxxx.rest.marketingcloudapis.com/automation/v1/filetransfers","application/json",payload,header);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.