Skip to content
English
  • There are no suggestions because the search field is empty.

Delete Media

You can delete a document using this API.

URL }/media/v1/delete_media/{sMediaid}/{bForceUnlinkAll}
Method GET
Parameters

sMediaid, string

bForcefulldef, integer (0,1)

Sample Request JSON  
Sample Response JSON

If the given media is not linked to a parcel, you can use bForcefulldef = 0;

   {

      "status": "ok",

      "number_linked_parcels": 0,

      "info": "media deleted 853387f7-63ba-4088-9a4e-87213b585692"

   }

 

If the given media is linked to one or more parcels, by using bForcefulldef = 0 you can get the list of linked parcels;

   {

      "status": "ok",

      "number_linked_parcels": 3,

      "linked_parcels": [

      {

         "parcelid": "8d30b77c-f500-40c6-a5ae-de070ea272ac",

         "reference": "Test Parcel",

         "weight": 0,

         "numberofstones": 0

      }

    ]

  }

 

If the given media is linked to one or more parcels, by using bForcefulldef = 1 you can delete the media and unlink that media from parcels;

   {

      "status": "ok",

      "number_linked_parcels": 3,

      "linked_parcels": [

         {

            "parcelid": "8d30b77c-f500-40c6-a5ae-de070ea272ac",

            "reference": "Test Parcel",

            "weight": 0,

           "numberofstones": 0

         },

      {

         "info": "Successfully deleted the association between the media and the parcel"

      }

   ],

   "info": "media deleted 634ae183-80df-461a-aa1a-44cd984c2b8b"

}

 

 

Response Codes 200: ok
Note:

bForceUnlinkAll=0: The deletion will only work if no parcel is linked to it. If this is the case, a list of linked parcels is given.

bForceUnlinkAll=1: The media will be deleted, and all the linked parcels will unlinked