Rebrand 2023 Learn more 

  • Products/
    Product Assets/
    Delete a File

    Delete a File

    This endpoint is for Administrator use only. Do not use this endpoint on your customer-facing frontends.

    DELETE Delete a File by ID

    https://useast.api.elasticpath.com/v2/files/:id
    

    Parameters

    Path parameters

    NameRequiredTypeDescription
    idRequiredstringThe unique identifier for the file.

    Headers

    NameRequiredTypeDescription
    AuthorizationRequiredstringThe Bearer token required to get access to the API.

    Request Example

    Curl

    curl -X DELETE https://useast.api.elasticpath.com/v2/files/:id \
         -H "Authorization: Bearer XXXX" \
         -H "Content-Type: application/json" \
    

    JavaScript SDK

    const fileId = "25617d3e-14a6-434c-bfab-3fda87517aaf";
    
    
    // Where `EPCC` is an authenticated client
    await EPCC.Files.Delete(fileId);
    

    Response Example

    204 No Content

    Previous
    Create a File