AboutContactLogin

Index

Working with SOAP

The Zenfolio API supports SOAP 1.1, which is widely supported by various development tools on different platforms. SOAP 1.1 calls are available with the HTTP POST method.

Many modern development tools can generate client proxies for calling SOAP services and thus save you the hassle of generating and parsing SOAP messages manually. To generate a proxy, a tool has to process the WSDL service description we provide, which is the formal contract between a server and a client.

If you decide to prepare and send SOAP messages manually, below is an example of the SOAP request and response (in this case, for the LoadPhoto method):

POST /api/1.7/zfapi.asmx HTTP/1.1<cr><lf>
Host: api.zenfolio.com<cr><lf>
User-Agent: Acme PhotoEdit plugin for Zenfolio<cr><lf>
Content-Type: text/xml; charset=utf-8<cr><lf>
Content-Length: 223<cr><lf>
SOAPAction: "http://www.zenfolio.com/api/1.7/LoadPhoto"<cr><lf>
<cr><lf>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <LoadPhoto xmlns="http://www.zenfolio.com/api/1.7">
      <photoId>327977501</photoId>
    </LoadPhoto>
  </soap:Body>
</soap:Envelope>

HTTP/1.1 200 OK<cr><lf>
Content-Type: text/xml; charset=utf-8<cr><lf>
Content-Length: 869<cr><lf>
<cr><lf>
<?xml version="1.0" encoding="utf-8"?>
<Photo xmlns="http://www.zenfolio.com/api/1.7">
  <Id>327977501</Id>
  <Width>878</Width>
  <Height>598</Height>
  <Title>Racoon</Title>
  <FileName>14.jpg</FileName>
  <Gallery>492530544</Gallery>
  <Keywords />
  <Categories>
    <Category>1018000</Category>
    <Category>1000000</Category>
  </Categories>
  <Size>482933</Size>
  <UploadedOn>2006-11-28T20:16:42.2900000-08:00</UploadedOn>
  <TakenOn>2006-11-28T12:16:42.2930000-08:00</TakenOn>
  <Views>0</Views>
  <MimeType>image/jpeg</MimeType>
  <OriginalUrl>/img/p327977501.jpg</OriginalUrl>
  <UrlCore>/img/p327977501</UrlCore>
  <AccessDescriptor>
    <RealmId>180436196</RealmId>
    <AccessType>Public</AccessType>
    <IsDerived>false</IsDerived>
    <AccessMask>None</AccessMask>
  </AccessDescriptor>
  <IsCensored>false</IsCensored>
</Photo>